scorpio преди 2 години
родител
ревизия
30910890f6
променени са 1 файла, в които са добавени 7 реда и са изтрити 1 реда
  1. 7 1
      src/views/home/component/inspect/Inspect1.vue

+ 7 - 1
src/views/home/component/inspect/Inspect1.vue

@@ -13,7 +13,9 @@
           @row-save="rowSave"
           @row-update="rowUpdate">
         <template #menu="{row}">
-          <el-button text type='primary' icon='el-icon-plus' @click='report(row)'>上报</el-button>
+          <el-button text type='primary' icon='el-icon-plus' @click='report(row)'>
+            {{ row.isReport === 1 ? "已上报" : "上报" }}
+          </el-button>
         </template>
       </avue-crud>
     </div>
@@ -122,6 +124,10 @@ export default {
       this.$refs.crud.rowAdd()
     },
     report (row) {
+      if (row.isReport === 1) {
+        this.$message.error('该记录已经上报')
+        return
+      }
       this.$confirm('是否确定进行上报操作?', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',