提交 67ba7598 编写于 作者: chengxiang.li's avatar chengxiang.li

更新项目管理页面及项目组件页面逻辑开发

上级 be7bfc09
......@@ -144,6 +144,16 @@ const vueFilter = {
return '已下架'
}else if(value[0] == 6) {
return '已拒绝'
}else if(value[0] == 7) {
return '待初审'
}else if(value[0] == 8) {
return '初审未通过'
}else if(value[0] == 9) {
return '待复审'
}else if(value[0] == 10) {
return '复审未通过'
}else if(value[0] == 11) {
return '复审通过'
}
},
projeceRoleType: (value) => {
......
......@@ -301,7 +301,7 @@
handleSizeChange(val){
console.log('handleSizeChange>>>')
this.searchForm.pageSize = val;
this.getDetailList();
this.goToSearch();
},
handleCurrentChange(val){
......
......@@ -354,7 +354,7 @@
handleSizeChange(val){
console.log('handleSizeChange>>>')
this.searchForm.pageSize = val;
this.getCreditList();
this.goToSearch();
},
handleCurrentChange(val){
......
......@@ -164,7 +164,7 @@
handleSizeChange(val){
console.log('handleSizeChange>>>')
this.searchForm.pageSize = val;
this.getSendList();
this.goToSearch();
},
handleCurrentChange(val){
......
......@@ -295,7 +295,8 @@
handleDeleteReq(req).then(res => {
if (res.code == "000000") {
console.log('删除用户列表 ', res)
// this.nameList = res.data;
this.goToSearch();
this.deleteVisible = false;
} else {
this.$message(res.message);
}
......@@ -309,7 +310,8 @@
handleSizeChange(val){
console.log('handleSizeChange>>>')
this.searchForm.pageSize = val;
this.getAuthTable();
this.goToSearch(1);
},
handleCurrentChange(val){
......
......@@ -71,7 +71,7 @@
</el-row>
<el-form :model="formInline" class="demo-form-inline">
<el-form-item>
<el-button class="add-button" :disabled="idType == 2 && masterAdministratorFlag == 'false'" size="small" type="primary" @click="toPage()">新建项目</el-button>
<el-button class="add-button" :disabled="idType == 2 && masterAdministratorFlag == 'false'" size="small" type="primary" @click="centerDialogVisible = true">新建项目</el-button>
</el-form-item>
</el-form>
<el-table :data="tableData" style="width: 100%">
......@@ -156,6 +156,13 @@
type="primary"
size="small"
>删除</el-button>
<!-- CME按钮 -->
<el-button
@click="hanldeCmeClick(scope.row)"
v-show="showCMEButton(scope.row)"
type="primary"
size="small"
>{{ cmeBtnText }}</el-button>
<el-button
@click="toShield(scope.row)"
v-show="scope.row.blackModifiable == true"
......@@ -189,6 +196,52 @@
:total="totalRows"
></el-pagination>
</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="centerDialogVisible"
width="600px"
:close-on-click-modal="false"
@close="handleTypeClose"
center>
<span style="margin: 0 20px;">项目类型:</span>
<el-radio-group v-model="newProjectType">
<el-radio :label="1">普通项目</el-radio>
<el-radio :label="2">CME项目</el-radio>
</el-radio-group>
<span slot="footer" class="dialog-footer">
<el-button @click="centerDialogVisible = false">取 消</el-button>
<el-button type="primary" @click="handleCreateProject">确 定</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>
</div>
</div>
</template>
......@@ -210,12 +263,63 @@ export default {
idValue: '',
curmbFirst: "教培项目",
curmbSecond: "项目管理",
centerDialogVisible: false, // 新建项目弹窗
firstCheckVisible: false, // 各种操作的确认弹窗
secondCheckVisible: false,
newProjectType: 1, // 1 普通项目 2 CME项目
searchParam: {
name: "",
status: "",
pageNo: 1,
pageSize: 10
},
cmeBtnText: '',
currentRow: {},
// operate: {
// type: '', // 何种操作
// title: '', // 弹窗标题
// text: '', // 弹窗文案
// leftBtn: '', // 左侧按钮文案
// rightBtn: '', // 右侧按钮文案
// },
// operateTypeObj: {
// '初审': {
// type: '',
// title: '项目初审',
// textLeft: '项目《',
// textMiddle: '',
// textRight: '》初审结果为?',
// leftBtn: '通过',
// rightBtn: '不通过',
// },
// '复审': {
// type: '',
// title: '项目复审',
// textLeft: '项目《',
// textMiddle: '',
// textRight: '》复审结果为?',
// leftBtn: '通过',
// rightBtn: '不通过',
// },
// '发布': {
// type: '',
// title: '项目发布',
// textLeft: '确定发布《',
// textMiddle: '',
// textRight: '》项目?',
// leftBtn: '确定',
// rightBtn: '取消',
// },
// '下架': {
// type: '',
// title: '项目下架',
// textLeft: '确定下架《',
// textMiddle: '',
// textRight: '》项目?',
// leftBtn: '确定',
// rightBtn: '取消',
// },
// },
optionStatus: [
{
value: 1,
......@@ -240,7 +344,29 @@ export default {
{
value: 6,
label: "已拒绝/未上架"
}
},
{
value: 7,
label: "待初审"
},
{
value: 8,
label: "初审未通过"
},
{
value: 9,
label: "待复审"
},
{
value: 10,
label: "复审未通过"
},
{
value: 11,
label: "复审通过"
},
// 加上去 。。。。。。。CME
],
tableData: [],
totalRows: 0,
......@@ -308,9 +434,60 @@ export default {
toPage() {
this.$router.push("edit-manager");
},
toCmePage() {
console.log('跳转至 cme 新建项目')
},
toShield(row) {
this.$router.push("item-shield?projectId="+row.id);
},
handleTypeClose() {
this.centerDialogVisible = false;
this.newProjectType = 1;
},
handleCreateProject() {
if (this.newProjectType == 1) { // 1 普通项目 2 CME项目
this.toPage();
} else if (this.newProjectType == 2) {
this.toCmePage();
}
},
hanldeCmeClick(row) {
this.currentRow = row;
let status = row.projectStatus;
// 7.待初审 8.初审未通过 9.待复审 10.复审未通过 11.复审通过
if (status == 7 || status == 8) { // 按钮显示 初审
// text = '初审';
this.firstCheckVisible = true;
} else if (status == 9 || status == 10) { // 按钮显示 复审
// text = '复审';
this.secondCheckVisible = true;
this.goToCheckAuth(row);
} else if (status == 11) { // 按钮显示 发布
// text = '发布';
}
},
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);
if (res.code == "000000") {
vm.tableData = res.data.data;
//console.log(vm.tableData);
vm.totalRows = res.data.totalRows;
}
});
},
searchList() {
this.formInline.pageNo = 1;
this.getProjectList();
......@@ -329,8 +506,21 @@ export default {
}
});
},
showCMEButton(row, type) {
// CME 专属状态码 为7~11,是这些代码的直接走新逻辑,别的走老逻辑
let cmeStatus = [7, 8, 9, 10, 11];
let currentStatus = parseInt(row.projectStatus);
if ( cmeStatus.indexOf(currentStatus) > -1 ) {
this.handleCmeOperate(row.projectStatus);
return true;
} else {
return false;
}
},
//按钮展示情况
showButton(row, type) {
// debugger;
// 按钮type类型: 0-编辑
// 1-暂存 2-完成 3-上架 4-通过 5-下架 6-拒绝
// 7- 提醒审核 8(2)-取消审核 9-删除
......@@ -350,7 +540,11 @@ export default {
buttonStatus = returnData().buttonStatusOut;
}
if (level != null) {
let statusSet = buttonStatus[projectStatus - 1][level];
let tempStatus = JSON.parse(JSON.stringify(projectStatus));
if (tempStatus > 6) {
tempStatus = 1;
}
let statusSet = buttonStatus[tempStatus - 1][level];
let flagValue = statusSet.indexOf(typeStr);
if (flagValue >= 0) {
flag = true;
......@@ -361,6 +555,20 @@ export default {
//flag = true;
return flag;
},
handleCmeOperate(status) {
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 = '发布';
}
this.cmeBtnText = text;
// return true / false;
},
//改变状态
changeStatus(row, type) {
let projectId = row.id;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册