From e3196bc81327e82748c7683c5cad9849b4b228b6 Mon Sep 17 00:00:00 2001 From: lxl <lixuliang_hd@126.com> Date: 星期三, 26 十月 2022 14:36:58 +0800 Subject: [PATCH] 菜单 --- src/views/datamanage/metadataManage.vue | 84 ++++++++++++++++++++++++------------------ 1 files changed, 48 insertions(+), 36 deletions(-) diff --git a/src/views/datamanage/metadataManage.vue b/src/views/datamanage/metadataManage.vue index bfa523a..e916a6b 100644 --- a/src/views/datamanage/metadataManage.vue +++ b/src/views/datamanage/metadataManage.vue @@ -23,6 +23,7 @@ >閲嶇疆</el-button > <el-button + v-if="btnStatus.download" @click="downFormData" icon="el-icon-download" type="success" @@ -37,6 +38,7 @@ >涓嬭浇</el-button > --> <el-button + v-if="btnStatus.delete" @click="DelFormData" icon="el-icon-delete" type="danger" @@ -59,21 +61,20 @@ > <el-table-column type="selection" width="55" /> <el-table-column min-width="150" prop="name" label="鏁版嵁鍚嶇О" /> - <el-table-column min-width="100" - prop="create_user" + prop="createUser" label="鍒涘缓浜哄憳" /> <el-table-column min-width="100" - prop="create_time" + prop="createTime" label="鍒涘缓鏃堕棿" /> - <el-table-column min-width="100" prop="coor_sys" label="鍧愭爣绯荤粺" /> + <el-table-column min-width="100" prop="cs" label="鍧愭爣绯荤粺" /> <el-table-column min-width="100" - prop="accuracy" + prop="scale" label="姣斾緥灏�/鍒嗚鲸鐜�" /> <el-table-column min-width="100" prop="format" label="瀛樺偍鏍煎紡" /> @@ -168,13 +169,15 @@ <el-divider></el-divider> <p>姣斾緥灏�/鍒嗚鲸鐜囷細{{ itemdetail.accuracy }}</p> <el-divider></el-divider> - <p>鍙戝竷鍦板潃锛歿{ itemdetail.s_url }} - <el-link + <p> + 鍙戝竷鍦板潃锛歿{ itemdetail.s_url }} + <el-link @click="ShowWindowFly(itemdetail.s_url)" :underline="false" type="primary" >璇︽儏</el-link - ></p> + > + </p> <el-divider></el-divider> <p>鏁版嵁鐗堟湰锛歿{ itemdetail.version }}</p> <el-divider></el-divider> @@ -263,8 +266,8 @@ <script> import { - queryMetaData, - queryDataCount, + select_meta_ByPageAndCount, + // queryDataCount, updateMetaData, dltMetaDatas, publishMeta, @@ -315,14 +318,29 @@ pageSize: 10, pageNum: 1, searchName: "", + btnStatus: { + select: false, + delete: false, + upload: false, + download: false, + insert: false, + update: false, + }, }; }, created() { this.getMetaData(10, 1, ""); - this.getMetaCount(""); + this.showPermsBtn(); }, methods: { - ShowWindowFly(res) { + showPermsBtn() { + let currentPerms = this.$store.state.currentPerms; + let permsEntity = this.$store.state.permsEntity; + permsEntity + .filter((item) => item.perms == currentPerms) + .map((item) => (this.btnStatus[item.tag.substr(1)] = true)); + }, + ShowWindowFly(res) { console.log(res); if (res == "") return; if (res.indexOf(".xls") != -1) { @@ -356,23 +374,24 @@ }, // 璇锋眰鏁版嵁鍐呭 getMetaData(size, num, name) { - queryMetaData(size, num, name).then((res) => { - this.tableData = res.data; + let params = { + name: name, + pageIndex: num, + pageSize: size, + }; + select_meta_ByPageAndCount(params).then((res) => { + // console.log(res); + this.tableData = res.result; + this.count = res.count; }); }, - // 璇锋眰鏁版嵁鏁伴噺 - getMetaCount(name) { - queryDataCount(name).then((res) => { - this.count = res.data; - }); - }, + // 鍏抽敭瀛楁煡璇� submitForm(formName) { this.$refs[formName].validate((valid) => { if (valid) { this.searchName = this.ruleForm.name.trim(); this.getMetaData(10, 1, this.searchName); - this.getMetaCount(this.searchName); } else { console.log("error submit!!"); return false; @@ -382,7 +401,6 @@ // 閲嶇疆鏌ヨ resetForm(formName) { this.getMetaData(10, 1, ""); - this.getMetaCount(""); this.searchName = ""; this.$refs[formName].resetFields(); }, @@ -424,7 +442,6 @@ }); } this.getMetaData(10, 1, ""); - this.getMetaCount(""); }); }) .catch(() => {}); @@ -444,7 +461,6 @@ .then(() => { dltMetaDatas(std).then((res) => { this.getMetaData(10, 1, ""); - this.getMetaCount(""); this.$message({ type: "success", message: "鍒犻櫎鎴愬姛!", @@ -507,31 +523,27 @@ // .catch(() => {}); }, handleStart(row) { - publishMeta(row.id).then((res) => { - console.log(res); - this.getMetaData(10, 1, ""); - this.getMetaCount(""); - }); + // publishMeta(row.id).then((res) => { + // console.log(res); + // this.getMetaData(10, 1, ""); + // }); }, handleStop(row) { console.log(row.id); - unpublishMeta(row.id).then((res) => { - console.log(res); - this.getMetaData(10, 1, ""); - this.getMetaCount(""); - }); + // unpublishMeta(row.id).then((res) => { + // console.log(res); + // this.getMetaData(10, 1, ""); + // }); }, // 鏉℃暟淇敼 handleSizeChange(val) { this.pageSize = val; this.getMetaData(this.pageSize, 1, this.searchName); - this.getMetaCount(this.searchName); }, // 椤垫暟淇敼 handleCurrentChange(val) { this.pageNum = val; this.getMetaData(this.pageSize, this.pageNum, this.searchName); - this.getMetaCount(this.searchName); }, }, }; -- Gitblit v1.9.3