noob 3 rokov pred
rodič
commit
b7ae2a3a80

+ 5 - 2
src/pages/main/performance/components/sheet.vue

@@ -2,7 +2,7 @@
  * @Author       : yuanrunwei
  * @Date         : 2021-12-04 14:23:58
  * @LastEditors  : yuanrunwei
- * @LastEditTime : 2021-12-24 16:00:44
+ * @LastEditTime : 2021-12-24 18:50:26
  * @FilePath     : \spfm-market-front\src\pages\main\performance\components\sheet.vue
 -->
 
@@ -29,7 +29,8 @@
                     type="primary"
                     @click="handleSave"
                     :disabled="handleForbid()"
-                    >{{ id ? "保存" : "新增" }}</el-button
+                    >{{ id ? "保存" : "新增"
+                    }}{{ handleForbid() ? `(请先设置权限)` : "" }}</el-button
                 >
             </template>
         </div>
@@ -136,6 +137,7 @@
                     </div>
                 </el-form-item>
             </el-form>
+            <template v-if="!id" v-slot:footer><div></div></template>
         </simple-dialog>
     </div>
 </template>
@@ -358,6 +360,7 @@ export default {
             if (!this.id) {
                 this.handleAddAuth({ id: body });
             }
+            this.$emit("save");
         },
         handleAuth() {
             this.$refs["form"].validate((valid) => {

+ 5 - 1
src/pages/main/performance/mould.vue

@@ -75,7 +75,7 @@
             @cancel="handleVisible('add')"
         >
             <el-form inline :model="form" label-width="100px"> </el-form>
-            <simple-sheet v-if="add_visible" type="edit" />
+            <simple-sheet v-if="add_visible" @save="handleSave" type="edit" />
             <template v-slot:footer><div></div></template>
         </simple-dialog>
         <simple-dialog
@@ -264,6 +264,10 @@ export default {
                 }
             });
         },
+        handleSave() {
+            this.handleVisible("add");
+            this.handleInit();
+        },
     },
     mounted() {
         this.handleInit();