dev_2022-05-11
luoJunYong.123 3 years ago
commit bd210f309f
  1. 3
      src/pages/assessment/list/index.vue
  2. 8
      src/pages/project/add/index.vue
  3. 34
      src/pages/project/list/index.vue

@ -97,7 +97,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="170"> <el-table-column label="操作" align="center" width="170">
<template slot-scope="scope" v-if="scope.row.show"> <template slot-scope="scope">
<template v-if="scope.row.status == 0"> <template v-if="scope.row.status == 0">
<el-button v-if="scope.row.type == 1" type="text" @click="start(scope.row)">启动</el-button> <el-button v-if="scope.row.type == 1" type="text" @click="start(scope.row)">启动</el-button>
<el-button v-if="auth('修改')" type="text" @click="edit(scope.row)">修改</el-button> <el-button v-if="auth('修改')" type="text" @click="edit(scope.row)">修改</el-button>
@ -236,7 +236,6 @@ export default {
beginTimer() { beginTimer() {
this.ticker = setInterval(() => { this.ticker = setInterval(() => {
if(this.sss == 0){ if(this.sss == 0){
clearInterval(this.ticker); clearInterval(this.ticker);
this.ticker = null; this.ticker = null;
}else{ }else{

@ -194,6 +194,7 @@ export default {
return { return {
projectId: this.$route.query.projectId, projectId: this.$route.query.projectId,
item: this.$route.query.item, item: this.$route.query.item,
founder: this.$route.query.founder,
systemList: [], systemList: [],
token: util.local.get(Setting.tokenKey), token: util.local.get(Setting.tokenKey),
isDetail: Boolean(this.$route.query.show), isDetail: Boolean(this.$route.query.show),
@ -292,13 +293,14 @@ export default {
"setSystemId", "setProject" "setSystemId", "setProject"
]), ]),
goBack() { // goBack() { //
if (this.isDetail) { if (this.isDetail || this.item == 0) {
this.$router.back(); this.$router.push(`/project/list?founder=${this.founder}`);
} else { } else {
this.$confirm("确定返回?未更新的信息将不会保存。", "提示", { this.$confirm("确定返回?未更新的信息将不会保存。", "提示", {
type: "warning" type: "warning"
}).then(() => { }).then(() => {
this.$router.back(); this.$router.push(`/project/list?founder=${this.founder}`);
// this.$router.back();
}).catch(() => { }).catch(() => {
}); });
} }

@ -86,8 +86,8 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="edit(scope.row,'0')">查看</el-button> <el-button type="text" @click="edit(scope.row,'0',queryData.founder)">查看</el-button>
<el-button v-if="scope.row.founder != 0" type="text" @click="edit(scope.row,'1')">编辑</el-button> <el-button v-if="scope.row.founder != 0" type="text" @click="edit(scope.row,'1',queryData.founder)">编辑</el-button>
<el-button v-if="scope.row.founder != 0" type="text" @click="handleDelete(scope.row.projectId)">删除</el-button> <el-button v-if="scope.row.founder != 0" type="text" @click="handleDelete(scope.row.projectId)">删除</el-button>
<el-button v-if="auth('复制')" type="text" @click="copyData(scope.row.projectId)">复制</el-button> <el-button v-if="auth('复制')" type="text" @click="copyData(scope.row.projectId)">复制</el-button>
<!-- <el-switch--> <!-- <el-switch-->
@ -147,16 +147,13 @@ export default {
{ {
value: "", value: "",
label: "不限" label: "不限"
}, }, {
{
value: 0, value: 0,
label: "练习" label: "练习"
}, }, {
{
value: 1, value: 1,
label: "考核" label: "考核"
}, }, {
{
value: 2, value: 2,
label: "竞赛" label: "竞赛"
} }
@ -170,12 +167,10 @@ export default {
{ {
value: 2, value: 2,
label: "全部" label: "全部"
}, }, {
{
value: 0, value: 0,
label: "系统" label: "系统"
}, }, {
{
value: 1, value: 1,
label: "老师" label: "老师"
} }
@ -188,12 +183,10 @@ export default {
{ {
value: "", value: "",
label: "不限" label: "不限"
}, }, {
{
value: 0, value: 0,
label: "草稿箱" label: "草稿箱"
}, }, {
{
value: 1, value: 1,
label: "已发布" label: "已发布"
} }
@ -243,6 +236,11 @@ export default {
if(this.queryDataStatus.platformId) { if(this.queryDataStatus.platformId) {
this.queryData = this.queryDataStatus this.queryData = this.queryDataStatus
} }
if(this.$route.query.founder && this.$route.query.founder != 'undefined'){
this.queryData.founder = +this.$route.query.founder
}else{
this.queryData.founder = 2
}
}, },
methods: { methods: {
...mapActions("project", [ ...mapActions("project", [
@ -289,11 +287,11 @@ export default {
}, },
add() { // add() { //
this.setSystemId(this.systemId); this.setSystemId(this.systemId);
this.$router.push("/project/add"); this.$router.push(`/project/add?founder=${this.queryData.founder}`);
}, },
edit(row,item) { // edit(row,item) { //
this.setSystemId(row.systemId); this.setSystemId(row.systemId);
this.$router.push(`/project/add?projectId=${row.projectId}&item=${item}`); this.$router.push(`/project/add?projectId=${row.projectId}&item=${item}&founder=${this.queryData.founder}`);
}, },
handleSelectionChange(val) { // handleSelectionChange(val) { //
this.multipleSelection = val; this.multipleSelection = val;

Loading…
Cancel
Save