From 96aea12d4cbbda5d51fd8e85fdfb871c1f20a7fc Mon Sep 17 00:00:00 2001 From: zuozhengqing <a13193816592@163.com> Date: 星期三, 10 四月 2024 11:30:17 +0800 Subject: [PATCH] 生丝定价,数据字典,车间管理接口联调 --- src/views/systemSetting/dataDictionary/index.vue | 71 ++++++++++++++++++++++++++++------- 1 files changed, 57 insertions(+), 14 deletions(-) diff --git a/src/views/systemSetting/dataDictionary/index.vue b/src/views/systemSetting/dataDictionary/index.vue index 4c7b83e..9c1b9da 100644 --- a/src/views/systemSetting/dataDictionary/index.vue +++ b/src/views/systemSetting/dataDictionary/index.vue @@ -1,7 +1,7 @@ <template> <div class="silkStandardSetting-container"> <div class="filter-card"> - <CommonSearch :show-add="false" :amount-view="false" placeholder="璇疯緭鍏ュ叧閿瘝" @searchClick="onFilterSearch"> + <CommonSearch ref="searchRef" :show-add="false" :amount-view="false" placeholder="璇疯緭鍏ュ叧閿瘝" @searchClick="onFilterSearch"> <template slot="leftButton"> <el-button size="small" type="primary" @click="addBtnClick">鏂板</el-button> <el-button size="small" type="primary" @click="refreshClick">鍒锋柊</el-button> @@ -9,7 +9,7 @@ </CommonSearch> </div> <div class="body-card"> - <div> + <div class="list-view"> <div class="bottom-tabs" > <div class="tab-pane" @click="getTab(0)" :style="{ background: TabsIndex == 0 ? '#2a78fb' : '#F1F3F8', @@ -36,7 +36,7 @@ 瑙勬牸 </div> </div> - <div class="list-view"> + <div > <TableCommonView :loading="loading" :table-list="productTableList" @selTableCol="selBottomTableCol"> <template slot="tableButton"> <el-table-column label="鎿嶄綔" width="160" fixed="right"> @@ -51,6 +51,9 @@ </TableCommonView> </div> </div> + <div class="btn-pager"> + <PagerView class="page" :pager-options="pagerOptions" v-on="pagerEvents" /> + </div> </div> <AddDataDictionaries :editDiaConfig="editConfig" @@ -60,12 +63,13 @@ <script> import AddDataDictionaries from "@/views/systemSetting/dataDictionary/components/addDataDictionaries.vue" -import {getDict} from "@/api/systemSetting/dataDictionary" +import {getDict,deleteDict} from "@/api/systemSetting/dataDictionary" +import pageMixin from "@/components/makepager/pager/mixin/pageMixin" export default { name: "dataDictionary", props: {}, components: {AddDataDictionaries}, - mixins: [], + mixins: [pageMixin], computed: {}, data() { return { @@ -92,12 +96,12 @@ ], showWorkshopCol: ["缂栫爜","杞﹂棿鍚嶇О", "鎻忚堪",], colorTableColumn:[ - { label: "甯﹀彿棰滆壊", prop: "member_name" }, + { label: "甯﹀彿棰滆壊", prop: "name" }, { label: "鎻忚堪", prop: "remark" }, ], showColorCol: ["甯﹀彿棰滆壊", "鎻忚堪",], specsTableColumn:[ - { label: "瑙勬牸", prop: "member_name" }, + { label: "瑙勬牸", prop: "name" }, { label: "鎻忚堪", prop: "remark" }, ], showSpecsCol: ["瑙勬牸", "鎻忚堪",], @@ -105,6 +109,7 @@ page: 1, pageSize:10, dictType:0, + keyword:"" }, } }, @@ -116,16 +121,24 @@ methods: { // 鎼滅储 onFilterSearch(searchText) { - console.log(searchText) + this.getDataParams.keyword=searchText, + this.getData() }, // 鏂板 addBtnClick() { this.editConfig.dialogTitle="鏂板" + this.editConfig.infomitton={} + this.editConfig.infomitton.TabsIndex=this.TabsIndex this.editConfig.visible=true }, // 鍒锋柊 refreshClick() { - console.log("a") + this.getDataParams.keyword = "" + this.pagerOptions.currPage = 1 + this.pagerOptions.pageSize = 15 + this.$refs.searchRef.searchInput="" + this.TabsIndex=0, + this.getData() }, // 鎵撳嵃 printClick() { @@ -225,22 +238,39 @@ getData(){ getDict({ dictType:this.TabsIndex, - page:this.getDataParams.page, - pageSize:this.getDataParams.pageSize, + page: this.pagerOptions.currPage, + pageSize: this.pagerOptions.pageSize, + keyword:this.getDataParams.keyword, }).then((res)=>{ - console.log(res,"res") this.productTableList.tableInfomation=res.data + this.pagerOptions.totalCount = res.total }) }, rowClick(row,type){ if(type==="鏌ョ湅"){ this.editConfig.dialogTitle="鏌ョ湅" this.editConfig.visible=true + this.editConfig.infomitton={...row,TabsIndex:this.TabsIndex} }else if(type==="淇敼"){ this.editConfig.dialogTitle="淇敼" this.editConfig.visible=true + this.editConfig.infomitton={...row,TabsIndex:this.TabsIndex} }else if(type==="鍒犻櫎"){ - console.log("鍒犻櫎") + this.$confirm('纭鍒犻櫎鍚�?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + deleteDict({id:row.ID}).then((res)=>{ + if(res&&res.code===200){ + this.getData() + this.$message({ + type: 'success', + message: '鍒犻櫎鎴愬姛!' + }); + } + }) + }) } } } @@ -313,4 +343,17 @@ .bgcWhite { background: #fff !important; -}</style> +} + +.list-view { + height: calc(100% - 60px); + overflow: hidden; +} +.btn-pager { + display: flex; + margin-top: 10px; + .page { + margin-left: auto; + } +} +</style> -- Gitblit v1.8.0