From 0c769a382b1d99c11b2b61a9c466bb373c52827f Mon Sep 17 00:00:00 2001 From: 王旭 <1377869194@qq.com> Date: 星期四, 29 九月 2022 17:01:49 +0800 Subject: [PATCH] 字典管理接口对接完成 --- src/views/datamanage/dictionaryManage.vue | 93 ++++++++++++++++------------------------------ 1 files changed, 32 insertions(+), 61 deletions(-) diff --git a/src/views/datamanage/dictionaryManage.vue b/src/views/datamanage/dictionaryManage.vue index 5829b6a..7879cf2 100644 --- a/src/views/datamanage/dictionaryManage.vue +++ b/src/views/datamanage/dictionaryManage.vue @@ -217,21 +217,21 @@ > <el-form :model="insertform"> <el-form-item label="缂栧彿" :label-width="formLabelWidth"> - <el-input v-model="insertform.oid" autocomplete="off"></el-input> + <el-input v-model="insertform.orderNum" autocomplete="off"></el-input> </el-form-item> <el-form-item label="琛ㄥ悕" :label-width="formLabelWidth"> <el-input - v-model="insertform.table_name" + v-model="insertform.tab" autocomplete="off" ></el-input> </el-form-item> <el-form-item label="琛ㄥ埆鍚�" :label-width="formLabelWidth"> <el-input - v-model="insertform.table_alias" + v-model="insertform.tabDesc" autocomplete="off" ></el-input> </el-form-item> - <el-form-item label="绫诲瀷" :label-width="formLabelWidth"> + <!-- <el-form-item label="绫诲瀷" :label-width="formLabelWidth"> <el-select v-model="insertform.table_type" style="width: 100%" @@ -241,27 +241,27 @@ <el-option label="绾垮嚑浣�" value="绾垮嚑浣�"></el-option> <el-option label="闈㈠嚑浣�" value="闈㈠嚑浣�"></el-option> </el-select> - </el-form-item> + </el-form-item> --> <el-form-item label="瀛楁鍚嶇О" :label-width="formLabelWidth"> <el-input - v-model="insertform.field_name" + v-model="insertform.field" autocomplete="off" ></el-input> </el-form-item> <el-form-item label="瀛楁鍒悕" :label-width="formLabelWidth"> <el-input - v-model="insertform.field_alias" + v-model="insertform.alias" autocomplete="off" ></el-input> </el-form-item> <el-form-item label="瀛楁绫诲瀷" :label-width="formLabelWidth"> <el-input - v-model="insertform.field_type" + v-model="insertform.type" autocomplete="off" ></el-input> </el-form-item> <el-form-item label="闀垮害" :label-width="formLabelWidth"> - <el-input v-model="insertform.length" autocomplete="off"></el-input> + <el-input v-model="insertform.len" autocomplete="off"></el-input> </el-form-item> <el-form-item label="绮惧害" :label-width="formLabelWidth"> <el-input @@ -269,14 +269,14 @@ autocomplete="off" ></el-input> </el-form-item> - <el-form-item label="鍊煎煙鍚嶇О" :label-width="formLabelWidth"> + <!-- <el-form-item label="鍊煎煙鍚嶇О" :label-width="formLabelWidth"> <el-input v-model="insertform.domain_name" autocomplete="off" ></el-input> - </el-form-item> + </el-form-item> --> <el-form-item label="澶囨敞" :label-width="formLabelWidth"> - <el-input v-model="insertform.remarks" autocomplete="off"></el-input> + <el-input v-model="insertform.bak" autocomplete="off"></el-input> </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> @@ -293,6 +293,7 @@ selectDictTab, deleteDicts, updateDict, + insertDict } from "../../api/api"; import MyBread from "../../components/MyBread.vue"; export default { @@ -410,28 +411,8 @@ }) .catch(() => {}); }, - submitForm(formName) { - this.$refs[formName].validate((valid) => { - if (valid) { - this.searchName = this.ruleForm.name.trim(); - this.count = 0; - this.selectFromData(10, 1, this.searchName); - this.countFromData(this.searchName); - } else { - console.log("error submit!!"); - return false; - } - }); - }, - resetForm(formName) { - this.count = 0; - this.pageSize = 1; - this.pageNum = 10; - this.selectFromData(10, 1, ""); - this.countFromData(""); - this.searchName = ""; - this.$refs[formName].resetFields(); - }, + + //鏌ョ湅璇︽儏 showDetail(index, row) { // console.log(index, row); this.showinfoBox = true; @@ -447,21 +428,7 @@ this.upform = row; console.log(this.upform); }, - handleDelete(index, row) { - this.$confirm("纭畾鏄惁鍒犻櫎鎵�閫夊唴瀹�?", "鎻愮ず", { - confirmButtonText: "纭畾", - cancelButtonText: "鍙栨秷", - type: "warning", - }) - .then(() => { - this.$message({ - type: "success", - message: "鍒犻櫎鎴愬姛!", - }); - this.startFromData(); - }) - .catch(() => {}); - }, + handleSizeChange(val) { console.log(val); // console.log(`姣忛〉 ${val} 鏉); @@ -472,20 +439,30 @@ this.listData.pageIndex = val; this.startQueryNameData(); }, - + //鏂板 insertFromData() { this.$confirm("鏄惁纭畾娣诲姞?", "鎻愮ず", { confirmButtonText: "纭畾", cancelButtonText: "鍙栨秷", type: "warning", }) - .then(() => { + .then(async () => { + const data = await insertDict(this.insertform); + if (data.code != 200) { + this.$message.error("鏂板澶辫触"); + } this.InsertFormdialog = false; + this.startQueryNameData(); + this.$message({ + message: "鏂板鎴愬姛", + type: "success", + }); + }) .catch(() => {}); }, - countFromData(name) {}, - selectFromData(size, index, name) {}, + + //鍒楄〃閫夋嫨 handleSelectionChange(val) { this.multipleSelection = val; @@ -511,17 +488,11 @@ type: "success", message: "鍒犻櫎鎴愬姛!", }); - this.startFromData(); + this.startQueryNameData(); }) .catch(() => {}); }, - startFromData() { - this.count = 0; - this.pageSize = 1; - this.pageNum = 10; - this.selectFromData(10, 1, this.searchName); - this.countFromData(this.searchName); - }, + //鎼滅储妗� changeQueryName(val) { this.listData.tab = val; -- Gitblit v1.9.3