File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 1818 </el-select >
1919 </el-card >
2020 <el-card class =" item" >
21- <el-button type =" primary" @click =" submit()" :loading =" buttonLoading"
22- >Resubmit</el-button
23- >
21+ <el-button v-if =" this.can_edit" type =" primary" @click =" submit()" :loading =" buttonLoading" >Resubmit</el-button >
2422 <el-button @click =" back()" >Back</el-button >
2523 </el-card >
2624 <el-card class =" item" >
@@ -113,6 +111,8 @@ export default {
113111 buttonLoading: false ,
114112 smallScreen: screen .width < 700 ,
115113 langTable: sfconfig .langTable ,
114+ is_mine: false ,
115+ can_edit: false
116116 };
117117 },
118118 methods: {
@@ -126,6 +126,14 @@ export default {
126126 this .time = data .time ;
127127 this .code = data .code ;
128128 this .lang_num = String (data .lang );
129+
130+ if (data .owner == String (this .$store .state .user .userid )) {
131+ this .is_mine = true ;
132+ }
133+ if (this .$store .state .user .isStaff || this .is_mine ) {
134+ this .can_edit = true ;
135+ }
136+
129137 this .$axios
130138 .get (apiurl (' /problem/' + String (this .pid )))
131139 .then ((title ) => {
You can’t perform that action at this time.
0 commit comments