From 8ac30411bb33e406e0ed5a2b6e2edaf7ab59f11f Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期六, 23 十一月 2024 17:10:21 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- admin/src/views/operation/record.vue | 138 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 138 insertions(+), 0 deletions(-) diff --git a/admin/src/views/operation/record.vue b/admin/src/views/operation/record.vue index e69de29..53e95ad 100644 --- a/admin/src/views/operation/record.vue +++ b/admin/src/views/operation/record.vue @@ -0,0 +1,138 @@ +<template> + <div class="main_app"> + <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear" /> + <div class="mt20"> + <el-button type="primary" @click="handleEdit()" icon="el-icon-plus" + v-permissions="['business:ywpatrolline:create']">鏂板缓</el-button> + <el-button type="primary" @click="handleEx" v-permissions="['business:ywpatrolline:create']">瀵煎嚭</el-button> + </div> + <el-table v-loading="loading" :data="list" stripe> + <el-table-column prop="" label="杩愮淮浜�" min-width="100" show-overflow-tooltip /> + <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="stautsName" label="璁惧鐘舵��" min-width="100" show-overflow-tooltip /> + <el-table-column prop="remark" label="杩愮淮澶囨敞" min-width="100" show-overflow-tooltip /> + <el-table-column prop="createTime" label="鍒涘缓鏃堕棿" min-width="100" show-overflow-tooltip /> + <el-table-column label="鎿嶄綔" min-width="120" fixed="right"> + <template slot-scope="{row}"> + <el-button type="text" @click="handleDetail(row)" icon="el-icon-edit" + v-permissions="['business:category:update']">鏌ョ湅</el-button> + </template> + </el-table-column> + </el-table> + <div class="mt20"> + <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" /> + </div> + <Edit v-if="showEdit" ref="EditRef" @success="getList" @close="showEdit = false" /> + </div> +</template> + +<script> +import Pagination from '@/components/common/Pagination' +import QueryForm from '@/components/common/QueryForm' +import Edit from './components/maintain.vue' +import { fetchList, deleteById } from '@/api/Inspection/device' +export default { + components: { + Pagination, + QueryForm, + Edit + }, + data() { + return { + loading: false, + showEdit: false, + pagination: { + pageSize: 10, + page: 1, + total: 0 + }, + filters: {}, + list: [], + total: 0, + queryFormConfig: { + formItems: [ + { + filed: 'name', + type: 'input', + label: '璁惧鍚嶇О', + placeholder: '璇疯緭鍏ヨ澶囧悕绉�/缂栫爜' + }, + { + filed: 'selTime', + type: 'datetimerange', + label: '鍒涘缓鏃堕棿' + }, + ], + online: true + } + } + }, + created() { + this.getList() + }, + methods: { + getList(page) { + const { pagination, filters } = this + this.loading = true + fetchList({ + model: { + ...filters, + }, + capacity: pagination.pageSize, + page: page || pagination.page, + }).then(res => { + this.loading = false + this.list = res.records || [] + this.list.forEach(item => { + item.stautsName = item.status == 0 ? '姝e父' : item.status == 1 ? '鎹熷潖' : '鎶ュ簾' + }) + this.pagination.total = res.total || 0 + }, () => { + this.loading = false + }) + }, + handleEx() { + + }, + handleEdit(row) { + this.showEdit = true + this.$nextTick(() => { + this.$refs.EditRef.isShowModal = true + if (row && row.id) { + this.$refs.EditRef.getDetail(row.id) + } + }) + + }, + handleDetail() { + + }, + handleDel(row) { + let message = `纭鍒犻櫎璇ヨ褰曞悧?` + this.$dialog.deleteConfirm(message) + .then(() => { + this.isWorking.delete = true + deleteById(row.id) + .then(() => { + this.$tip.apiSuccess('鍒犻櫎鎴愬姛') + this.getList() + }) + }) + .catch(() => { }) + }, + clear() { + this.filters = {} + this.pagination.pageSize = 10 + this.pagination.page = 1 + this.getList() + }, + handleSizeChange(capacity) { + this.pagination.pageSize = capacity + this.getList() + } + } +} +</script> + +<style></style> -- Gitblit v1.9.3