From f29900986f01cf5d39b5755cec674825cef27961 Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期二, 19 十一月 2024 19:25:41 +0800
Subject: [PATCH] update

---
 src/views/console/base/code-rules.vue |   60 ++++++++++++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 46 insertions(+), 14 deletions(-)

diff --git a/src/views/console/base/code-rules.vue b/src/views/console/base/code-rules.vue
index ce1a972..e33161e 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
 -->
@@ -37,7 +37,7 @@
 			</el-table>
 		</div>
 		<el-drawer :title="'褰撳墠閫変腑鑿滃崟璺緞'+drawerPath" v-model="drawer" :direction="direction" :before-close="handleClose" size="780" class="drawerClass">
-			<el-form :inline="true" :model="drawerSearchData" abel-width="120px">
+			<el-form :inline="true" :model="drawerSearchData" label-width="100px">
 				<el-form-item label="鎺ュ彛妯″潡">
 					<el-select v-model="drawerSearchData.moduleCode" style="width: 100%">
 						<el-option v-for="item in aList" :key="item.id" :label="item.title" :value="item.id"/>
@@ -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