Skip to content

Commit

Permalink
Merge pull request 'feat' (#27) from dev into main
Browse files Browse the repository at this point in the history
  • Loading branch information
FleyX committed Nov 29, 2022
2 parents bb49dd0 + 5b01d40 commit ffb2140
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import HttpUtil from "../../../utils/HttpUtil";
import dayjs from "dayjs";
export default {
name: "ApplicationRuleList",
props: ["curId"],
emits: ["templateUpdate"],
data() {
return {
Expand Down Expand Up @@ -79,6 +80,10 @@ export default {
this.templateForm.comment = rowData.comment;
this.showEditAddModal = true;
} else {
if (this.curId == rowData.id) {
this.$message({ message: "当前模板使用中,无法删除", type: "warning" });
return;
}
await HttpUtil.delete("/applicationRule/" + rowData.id);
await this.init();
}
Expand Down
2 changes: 1 addition & 1 deletion openRenamerFront/src/views/home/components/RuleBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<rule :editRule="editRule" @ruleAdd="ruleAdd" v-if="addRuleDialogShow" />
</el-dialog>
<el-dialog title="模板管理" v-model="ruleTemplateShow" width="70%">
<application-rule-list v-if="ruleTemplateShow" @templateUpdate="templateUpdate" />
<application-rule-list v-if="ruleTemplateShow" :curId="chosedTemplate.id" @templateUpdate="templateUpdate" />
</el-dialog>
</div>
</template>
Expand Down

0 comments on commit ffb2140

Please sign in to comment.