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 18
18
</el-select >
19
19
</el-card >
20
20
<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 >
24
22
<el-button @click =" back()" >Back</el-button >
25
23
</el-card >
26
24
<el-card class =" item" >
@@ -113,6 +111,8 @@ export default {
113
111
buttonLoading: false ,
114
112
smallScreen: screen .width < 700 ,
115
113
langTable: sfconfig .langTable ,
114
+ is_mine: false ,
115
+ can_edit: false
116
116
};
117
117
},
118
118
methods: {
@@ -126,6 +126,14 @@ export default {
126
126
this .time = data .time ;
127
127
this .code = data .code ;
128
128
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
+
129
137
this .$axios
130
138
.get (apiurl (' /problem/' + String (this .pid )))
131
139
.then ((title ) => {
You can’t perform that action at this time.
0 commit comments