Merge pull request 'feat' (#27) from dev into main

Reviewed-on: #27
This commit is contained in:
fanxb 2022-11-29 23:05:07 +08:00
commit ffb214064b
2 changed files with 6 additions and 1 deletions

View File

@ -41,6 +41,7 @@ import HttpUtil from "../../../utils/HttpUtil";
import dayjs from "dayjs";
export default {
name: "ApplicationRuleList",
props: ["curId"],
emits: ["templateUpdate"],
data() {
return {
@ -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();
}

View File

@ -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>