From f5edc2904945f37b164a7874d502cf002fae024e Mon Sep 17 00:00:00 2001 From: lzhe <lzhe@example.com> Date: 星期一, 13 五月 2024 13:52:26 +0800 Subject: [PATCH] 1 --- src/views/console/base/code-rules.vue | 58 +++++++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 45 insertions(+), 13 deletions(-) diff --git a/src/views/console/base/code-rules.vue b/src/views/console/base/code-rules.vue index ce1a972..3bd9029 100644 --- a/src/views/console/base/code-rules.vue +++ b/src/views/console/base/code-rules.vue @@ -2,7 +2,7 @@ * @Author: lzhe lzhe@example.com * @Date: 2024-03-26 10:28:33 * @LastEditors: lzhe lzhe@example.com - * @LastEditTime: 2024-04-17 17:52:50 + * @LastEditTime: 2024-05-13 11:39:54 * @FilePath: /smart-web/src/views/master/person/main/index.vue * @Description: 杩欐槸榛樿璁剧疆,璇疯缃甡customMade`, 鎵撳紑koroFileHeader鏌ョ湅閰嶇疆 杩涜璁剧疆: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE --> @@ -69,28 +69,29 @@ <el-button @click="closeDrawer">鍙栨秷</el-button> </div> </el-drawer> - <el-dialog title="瑙勫垯鍒嗙被" v-model="visible" :width="500"> + <el-dialog title="瑙勫垯鍒嗙被" v-model="visible" :width="600" @closed="closeVisible('closed')"> <el-form :model="classificationForm" :rules="classificationRules" ref="dialogForm" label-width="120px" label-position="center"> <el-row> <el-col :span="12"> - <el-form-item label="鍒嗙被瑙勫垯" prop="code"> - <el-input v-model="classificationForm.code" placeholder="鍒嗙被瑙勫垯" clearable></el-input> + <el-form-item label="鍒嗙被瀛楁" prop="classify"> + <el-select v-model="classificationForm.classify" style="width: 100%" placeholder="璇烽�夋嫨"> + <el-option v-for="item in aList" :key="item.id" :label="item.title" :value="item.id"/> + </el-select> </el-form-item> </el-col> <el-col :span="12"> - <el-form-item label="鍒嗙被瀛楀吀" prop="name"> - <el-input v-model="classificationForm.name" placeholder="鍒嗙被瀛楀吀" clearable></el-input> + <el-form-item label="鍒嗙被瀛楀吀"> + <el-input v-model="classificationForm.dictionary" placeholder="鍒嗙被瀛楀吀" clearable></el-input> </el-form-item> </el-col> </el-row> </el-form> <template #footer> <el-button @click="visible = false">鍙栨秷</el-button> - <el-button type="primary" :loading="isSaveing" @click="classificationSubmit()">纭畾</el-button> + <el-button type="primary" :loading="isSaveing" @click="classificationSubmit">纭畾</el-button> </template> </el-dialog> - </div> </template> <script> @@ -98,13 +99,19 @@ name: "apiscope", data(){ return { - classificationRules: {}, - classificationForm: {}, + classificationRules: { + classify: [ + { required: true, message: "璇烽�夋嫨鍒嗙被瀛楁" } + ] + }, + classificationForm: { + classify: "", + dictionary: "" + }, isSaveing: false, visible: false, drawerPath: "", searchData: { - menuId: "", size: "15", current: "1" }, @@ -138,8 +145,33 @@ }, methods: { + closeVisible(flag) { + if(flag == "closed") { + this.classificationForm = { + classify: "", + dictionary: "" + } + this.$refs.dialogForm.resetFields(); + }; + }, classificationSubmit() { - + this.$refs.dialogForm.validate(async (valid) => { + if (valid) { + this.isSaveing = false; + // this.$HTTP.post("/api/blade-system/data-scope/submit",obj).then(res=> { + // this.isSaveing = false; + // if(res.code == 200) { + // this.$emit('success', this.addDictForm, this.mode); + // this.visible = false; + // this.$message.success("鎿嶄綔鎴愬姛"); + // }else { + // this.$alert(res.message, "鎻愮ず", {type: 'error'}); + // } + // }) + }else{ + return false; + } + }) }, openVisible() { this.visible = true; @@ -196,7 +228,7 @@ // }else { // this.parentId = '0'; // } - // this.$HTTP.get("/api/blade-system/menu/lazy-list",{parentId: this.parentId}).then(res=> { + // this.$HTTP.get("/api/blade-system/dict/dictionary-tree?code=code_rule_for_biz_objects").then(res=> { // if(res.code == 200) { // res.data.forEach(node => { // node.hasChildren = !node.hasChildren; -- Gitblit v1.9.3