liqianyi 3 жил өмнө
parent
commit
4732e020c9

+ 12 - 1
src/views/modules/works/work.vue

@@ -92,7 +92,7 @@
         label="完成记录说明">
       </el-table-column>
       <el-table-column
-        v-if="dataForm.state !== '3'"
+        v-if="opColVisible"
         fixed="right"
         header-align="center"
         align="center"
@@ -209,10 +209,21 @@ import UserComponent from '@/views/modules/common/user-component'
 export default {
   components: { UserComponent, PreviewComponent, templateList },
   name: 'work',
+  computed: {
+    userId: {
+      get () { return this.$store.state.user.id }
+    }
+  },
+  watch: {
+    'dataForm.userId' (value) {
+      this.opColVisible = (Number(this.dataForm.state) !== 3 && value === this.userId)
+    }
+  },
   data () {
     return {
       previewVisible: false,
       addOrUpdateVisible: false,
+      opColVisible: true,
       dataForm: {
         state: '1'
       },