From a2299a6d4a6f99e9c11132138f5d3e9ec68f03ea Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期五, 06 六月 2025 19:19:34 +0800 Subject: [PATCH] 开发更新 --- admin/src/views/operation/device.vue | 30 +++++++++++++++++++++++------- 1 files changed, 23 insertions(+), 7 deletions(-) diff --git a/admin/src/views/operation/device.vue b/admin/src/views/operation/device.vue index 202eccd..43a7339 100644 --- a/admin/src/views/operation/device.vue +++ b/admin/src/views/operation/device.vue @@ -8,16 +8,24 @@ <el-table v-loading="loading" :data="list" stripe> <el-table-column prop="code" label="璁惧缂栧彿" min-width="100" show-overflow-tooltip /> <el-table-column prop="name" label="璁惧鍚嶇О" min-width="100" show-overflow-tooltip /> - <el-table-column prop="" label="璁惧鍒嗙被" min-width="100" show-overflow-tooltip /> + <el-table-column prop="categoryName" label="璁惧鍒嗙被" min-width="100" show-overflow-tooltip /> <el-table-column prop="modelNo" label="璁惧鍨嬪彿" min-width="100" show-overflow-tooltip /> <el-table-column prop="realName" label="绠$悊鍛�" min-width="100" show-overflow-tooltip /> - <el-table-column prop="company" label="璁惧渚涘簲鍟�" min-width="100" show-overflow-tooltip /> - <el-table-column prop="status" label="璁惧鐘舵��" min-width="100" show-overflow-tooltip /> - <el-table-column label="鎿嶄綔" min-width="120" fixed="right"> + <el-table-column prop="supplier" label="璁惧渚涘簲鍟�" min-width="100" show-overflow-tooltip /> + <el-table-column prop="status" label="璁惧鐘舵��" min-width="100" show-overflow-tooltip> <template slot-scope="{row}"> + <span v-if="row.status == 0">姝e父</span> + <span v-if="row.status == 1">鎹熷潖</span> + <span v-if="row.status == 2">鎶ュ簾</span> + </template> + </el-table-column> + <el-table-column label="鎿嶄綔" min-width="130" fixed="right"> + <template slot-scope="{row}"> + <el-button type="text" @click="handleDetail(row)" + v-permissions="['business:category:update']">鏌ョ湅璇︽儏</el-button> <el-button type="text" @click="handleEdit(row)" icon="el-icon-edit" v-permissions="['business:category:update']">缂栬緫</el-button> - <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" + <el-button type="text" @click="handleDel(row)" icon="el-icon-delete" v-permissions="['business:category:delete']">鍒犻櫎</el-button> </template> </el-table-column> @@ -26,6 +34,7 @@ <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" /> </div> <Edit v-if="showEdit" ref="EditRef" @success="getList" @close="showEdit = false" /> + <Detail ref="DetailRef" /> </div> </template> @@ -33,12 +42,14 @@ import Pagination from '@/components/common/Pagination' import QueryForm from '@/components/common/QueryForm' import Edit from './components/deviceEdit' +import Detail from './components/deviceDetail' import { fetchList, deleteById } from '@/api/Inspection/device' export default { components: { Pagination, QueryForm, - Edit + Edit, + Detail }, data() { return { @@ -99,6 +110,11 @@ this.loading = false }) }, + handleDetail(row) { + this.$refs.DetailRef.visible = true + this.$refs.DetailRef.id = row.id + this.$refs.DetailRef.getDetail() + }, handleEdit(row) { this.showEdit = true this.$nextTick(() => { @@ -113,7 +129,6 @@ let message = `纭鍒犻櫎璇ヨ褰曞悧?` this.$dialog.deleteConfirm(message) .then(() => { - this.isWorking.delete = true deleteById(row.id) .then(() => { this.$tip.apiSuccess('鍒犻櫎鎴愬姛') @@ -130,6 +145,7 @@ }, handleSizeChange(capacity) { this.pagination.pageSize = capacity + this.getList() } } } -- Gitblit v1.9.3