|
@@ -50,7 +50,7 @@
|
|
|
|
|
|
<script>
|
|
|
import ImageViewContain from "@/components/ImageViewContain";
|
|
|
-import { markTask } from "@/api";
|
|
|
+import { markTask, markPaper } from "@/api";
|
|
|
|
|
|
export default {
|
|
|
name: "marker-image-view",
|
|
@@ -88,6 +88,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ curUserRoleType: this.$ls.get("user", { role: "" }).role,
|
|
|
initImage: {
|
|
|
id: "",
|
|
|
thumbSrc: "",
|
|
@@ -120,10 +121,19 @@ export default {
|
|
|
async toMark() {
|
|
|
if (this.loading) return;
|
|
|
this.loading = true;
|
|
|
- const res = await markTask({
|
|
|
- markTaskId: this.image.id,
|
|
|
- isMark: !this.image.mark
|
|
|
- }).catch(() => {});
|
|
|
+ let res = null;
|
|
|
+ if (this.curUserRoleType === "MARK_LEADER") {
|
|
|
+ res = await markPaper({
|
|
|
+ paperId: this.image.id,
|
|
|
+ isMark: !this.image.mark,
|
|
|
+ role: this.curUserRoleType
|
|
|
+ }).catch(() => {});
|
|
|
+ } else {
|
|
|
+ res = await markTask({
|
|
|
+ markTaskId: this.image.id,
|
|
|
+ isMark: !this.image.mark
|
|
|
+ }).catch(() => {});
|
|
|
+ }
|
|
|
this.loading = false;
|
|
|
if (!res) return;
|
|
|
this.image.mark = !this.image.mark;
|