refactor(deviceManagement): 替换国际化文本为中文并优化组件样式
重构设备管理相关视图组件,将国际化文本替换为中文显示,优化按钮样式和布局。主要变更包括:
1. 将按钮文本从$t('btn.xxx')替换为中文
2. 调整部分组件的样式和布局
3. 统一使用el-image替换ImagePreview组件
4. 优化树选择组件实现
5. 调整对话框的关闭行为和样式
这些变更加强了用户体验一致性,移除了国际化依赖,使界面更符合中文用户习惯。
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" label-position="right" inline ref="queryRef" v-show="showSearch" @submit.prevent>
|
||||
<el-form-item label="点检名称" prop="deviceName">
|
||||
<el-input v-model.trim="queryParams.name" placeholder="请输入点检名称" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="点检状态" prop="status">
|
||||
<el-radio-group v-model="queryParams.status" @change="handleQuery">
|
||||
<el-radio-button label="全部" :value="-1" />
|
||||
<el-radio-button label="停用" :value="0" />
|
||||
<el-radio-button label="启用" :value="1" />
|
||||
<el-radio-button :label="-1">全部</el-radio-button>
|
||||
<el-radio-button :label="0">停用</el-radio-button>
|
||||
<el-radio-button :label="1">启用</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="类别" prop="innerType">
|
||||
<el-radio-group v-model="queryParams.innerType" @change="handleQuery">
|
||||
<el-radio-button label="全部" :value="-1" />
|
||||
<el-radio-button label="检查" :value="1" />
|
||||
<el-radio-button label="保养" :value="2" />
|
||||
<el-radio-button :label="-1">全部</el-radio-button>
|
||||
<el-radio-button :label="1">检查</el-radio-button>
|
||||
<el-radio-button :label="2">保养</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
@@ -28,15 +28,22 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-search" type="primary" @click="handleQuery">{{ $t('btn.search') }}</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">{{ $t('btn.reset') }}</el-button>
|
||||
<el-button type="primary" @click="handleQuery">
|
||||
<i class="el-icon-search"></i>
|
||||
<span>搜索</span>
|
||||
</el-button>
|
||||
<el-button @click="resetQuery">
|
||||
<i class="el-icon-refresh"></i>
|
||||
<span>重置</span>
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 工具区域 -->
|
||||
<el-row :gutter="15" class="mb10">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" v-hasPermi="['deviceManagement:devicepointinspectionplan:add']" plain icon="el-icon-plus" @click="handleAdd">
|
||||
{{ $t('btn.add') }}
|
||||
<el-button type="primary" plain @click="handleAdd">
|
||||
<i class="el-icon-plus"></i>
|
||||
<span>新增</span>
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||
@@ -51,12 +58,14 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="添加设备" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="small" icon="el-icon-message-box" title="添加设备" @click="AddDevice(scope.row)"></el-button>
|
||||
<el-button type="primary" icon="el-icon-folder-add" size="small" title="添加设备" @click="AddDevice(scope.row)">
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="立刻派发" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="success" size="small" icon="el-icon-promotion" @click="dispatch(scope.row)"></el-button>
|
||||
<el-button type="success" icon="el-icon-position" size="small" @click="dispatch(scope.row)">
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="fkPersonId" label="执行人" align="center" :show-overflow-tooltip="true" v-if="columns_showColumn('fkPersonId')" />
|
||||
@@ -70,15 +79,19 @@
|
||||
|
||||
<el-table-column label="操作" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="success" size="small" icon="el-icon-edit" title="编辑" v-hasPermi="['deviceManagement:devicepointinspectionplan:edit']" @click="handleUpdate(scope.row)"></el-button>
|
||||
<el-button type="danger" size="small" icon="el-icon-delete" title="删除" v-hasPermi="['deviceManagement:devicepointinspectionplan:delete']" @click="handleDelete(scope.row)"></el-button>
|
||||
<el-button type="success" size="small" title="编辑" @click="handleUpdate(scope.row)">
|
||||
<i class="el-icon-edit"></i>
|
||||
</el-button>
|
||||
<el-button type="danger" size="small" title="删除" @click="handleDelete(scope.row)">
|
||||
<i class="el-icon-delete"></i>
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
||||
|
||||
<!-- 添加或修改点检任务对话框 -->
|
||||
<el-dialog :title="title" :lock-scroll="false" v-model="open">
|
||||
<el-dialog :title="title" :lock-scroll="false" :visible.sync="open">
|
||||
<el-form ref="formRef" :model="form" :rules="rules" label-width="100px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :lg="12">
|
||||
@@ -117,16 +130,16 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template slot="footer" v-if="opertype != 3">
|
||||
<el-button text @click="cancel">{{ $t('btn.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="submitForm">{{ $t('btn.submit') }}</el-button>
|
||||
<el-button text @click="cancel">取消</el-button>
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="添加设备" :lock-scroll="false" v-model="open_device">
|
||||
<el-dialog title="添加设备" :lock-scroll="false" :visible.sync="open_device">
|
||||
<Devicelist :message="messageFromParent" :flag="point"></Devicelist>
|
||||
<template slot="footer">
|
||||
<el-button text @click="open_device = false">{{ $t('btn.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="open_device = false">{{ $t('btn.submit') }}</el-button>
|
||||
<el-button text @click="open_device = false">取消</el-button>
|
||||
<el-button type="primary" @click="open_device = false">提交</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user