From 06d3d15a5a08637041cc601101c063b11b07a346 Mon Sep 17 00:00:00 2001 From: net <net@netdeMBP.lan> Date: 星期五, 14 二月 2025 17:25:21 +0800 Subject: [PATCH] 合并理去杀杀人 --- zhitan-vue/src/views/modelconfiguration/calculationformula/calculationFormula.vue | 109 ++++++++++++++++++++++++++++-------------------------- 1 files changed, 56 insertions(+), 53 deletions(-) diff --git a/zhitan-vue/src/views/modelconfiguration/calculationformula/calculationFormula.vue b/zhitan-vue/src/views/modelconfiguration/calculationformula/calculationFormula.vue index 1439337..4035a00 100644 --- a/zhitan-vue/src/views/modelconfiguration/calculationformula/calculationFormula.vue +++ b/zhitan-vue/src/views/modelconfiguration/calculationformula/calculationFormula.vue @@ -1,47 +1,48 @@ <template> - <div class="page"> - <div class="form-card"> - <el-form ref="form" :inline="true" :model="queryParams" @submit.prevent label-width="80px"> - <el-form-item label="鍑芥暟鍚�"> - <el-input v-model="queryParams.funcName" placeholder="璇疯緭鍏ュ嚱鏁板悕" /> - </el-form-item> - <el-form-item> - <el-button type="primary" icon="Search" @click="handleQuery">鎼滅储</el-button> - <el-button icon="Refresh" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - </el-form> - </div> - <div class="table-box"> - <el-table :data="tableData" style="width: 100%"> - <el-table-column prop="funcName" label="鍑芥暟鍚�" show-overflow-tooltip align="center"> - </el-table-column> - <el-table-column prop="funcText" label="鍑芥暟鏂囨湰" show-overflow-tooltip align="center"> - </el-table-column> - <el-table-column prop="info" label="浠嬬粛" show-overflow-tooltip align="center"> - </el-table-column> - <el-table-column prop="prop" label="鎿嶄綔" width="150" align="center"> + <div class="page"> + <div class="form-card"> + <el-form ref="form" :inline="true" :model="queryParams" @submit.prevent label-width="80px"> + <el-form-item label="鍑芥暟鍚�"> + <el-input v-model="queryParams.funcName" placeholder="璇疯緭鍏ュ嚱鏁板悕" /> + </el-form-item> + <el-form-item> + <el-button type="primary" icon="Search" @click="handleQuery">鎼滅储</el-button> + <el-button icon="Refresh" @click="resetQuery">閲嶇疆</el-button> + </el-form-item> + </el-form> + </div> + <div class="table-box"> + <el-table :data="tableData" style="width: 100%"> + <el-table-column prop="funcName" label="鍑芥暟鍚�" show-overflow-tooltip align="center"> </el-table-column> + <el-table-column prop="funcText" label="鍑芥暟鏂囨湰" show-overflow-tooltip align="center"> </el-table-column> + <el-table-column prop="info" label="浠嬬粛" show-overflow-tooltip align="center"> </el-table-column> + <!-- <el-table-column prop="prop" label="鎿嶄綔" width="150" align="center"> <template #default="scope"> <el-button link type="primary" icon="Delete" @click="handleDel(scope.row)"> 鍒犻櫎 </el-button> </template> - </el-table-column> - </el-table> - <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" - v-model:limit="queryParams.pageSize" @pagination="getList" /> - </div> + </el-table-column> --> + </el-table> + <pagination + v-show="total > 0" + :total="total" + v-model:page="queryParams.pageNum" + v-model:limit="queryParams.pageSize" + @pagination="getList" + /> </div> + </div> </template> <script setup> - -import { delFunction, listFunction } from '@/api/modelConfiguration/indexWarehouse'; +import { delFunction, listFunction } from "@/api/modelConfiguration/indexWarehouse" let { proxy } = getCurrentInstance() let queryParams = ref({ - funcName: '', - pageNum: 1, - pageSize: 10, + funcName: "", + pageNum: 1, + pageSize: 10, }) let tableData = ref([]) let total = ref(0) @@ -49,40 +50,42 @@ /** 鎼滅储鎸夐挳鎿嶄綔 */ function handleQuery() { - queryParams.value.pageNum = 1; - getList(); + queryParams.value.pageNum = 1 + getList() } /** 閲嶇疆鎸夐挳鎿嶄綔 */ function resetQuery() { - queryParams.value={} - handleQuery(); + queryParams.value = {} + handleQuery() } function getList() { - loading.value = true; - listFunction(queryParams.value).then(response => { - tableData.value = response.rows; - total.value = response.total; - loading.value = false; - }); + loading.value = true + listFunction(queryParams.value).then((response) => { + tableData.value = response.rows + total.value = response.total + loading.value = false + }) } getList() /** 鍒犻櫎鎸夐挳鎿嶄綔 */ function handleDel(row) { - proxy.$modal.confirm('鏄惁纭鍒犻櫎璁$畻鍑芥暟涓�"' + row.funcName + '"鐨勬暟鎹」?', "璀﹀憡", { - confirmButtonText: "纭畾", - cancelButtonText: "鍙栨秷", - type: "warning" - }).then(function () { - return delFunction(row.id); - }).then(() => { - getList(); - proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(function () { - }); + proxy.$modal + .confirm('鏄惁纭鍒犻櫎璁$畻鍑芥暟涓�"' + row.funcName + '"鐨勬暟鎹」?', "璀﹀憡", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", + }) + .then(function () { + return delFunction(row.id) + }) + .then(() => { + getList() + proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛") + }) + .catch(function () {}) } </script> - <style lang="scss" scoped> @import "@/assets/styles/page.scss"; -- Gitblit v1.9.3