ui
This commit is contained in:
@@ -9,72 +9,80 @@
|
||||
<el-drawer
|
||||
:visible.sync="visible"
|
||||
:show-close="false"
|
||||
:wrapper-closable="false"
|
||||
:wrapper-closable="disabled"
|
||||
class="drawer"
|
||||
size="60%">
|
||||
size="60%"
|
||||
@closed="$emit('destroy')">
|
||||
<small-title slot="title" :no-padding="true">
|
||||
{{ disabled ? '查看备件' : '添加备件' }}
|
||||
</small-title>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="dataForm"
|
||||
label-width="100px"
|
||||
v-loading="formLoading">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="配置名" prop="name">
|
||||
<span>{{ dataForm.name }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备名称" prop="equipmentName">
|
||||
<span>{{ dataForm.equipmentName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人" prop="responsible">
|
||||
<span>{{ dataForm.responsible }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="描述" prop="faultTime">
|
||||
<editor v-model="dataForm.description" read-only :min-height="200"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="content">
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="dataForm"
|
||||
label-width="100px"
|
||||
label-position="top"
|
||||
v-loading="formLoading">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="配置名" prop="name">
|
||||
<span>{{ dataForm.name }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="设备名称" prop="equipmentName">
|
||||
<span>{{ dataForm.equipmentName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="负责人" prop="responsible">
|
||||
<span>{{ dataForm.responsible }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="描述" prop="description">
|
||||
<div v-html="dataForm.description" style="padding: 5px; margin: 0; border: 1px solid #dfdfdf" />
|
||||
<!-- <editor v-model="dataForm.description" read-only :min-height="200"/> -->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div v-if="!disabled" class="action_btn">
|
||||
<template>
|
||||
<span style="display: inline-block;" @click="addNew()">
|
||||
<svg-icon style="width: 14px; height: 14px" class="item-icon" icon-class="table_add" />
|
||||
<span class="add">添加</span>
|
||||
</span>
|
||||
</template>
|
||||
</div>
|
||||
<base-table
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="list">
|
||||
<method-btn
|
||||
v-if="!disabled"
|
||||
slot="handleBtn"
|
||||
:width="120"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination
|
||||
v-show="listQuery.total > 0"
|
||||
:total="listQuery.total"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page-sizes="[5, 10, 15]"
|
||||
@pagination="getList" />
|
||||
<div>
|
||||
<small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
|
||||
{{ '备品备件' }}
|
||||
</small-title>
|
||||
<div v-if="!disabled" class="action_btn">
|
||||
<template>
|
||||
<span style="display: inline-block;" @click="addNew()">
|
||||
<svg-icon style="width: 14px; height: 14px" class="item-icon" icon-class="table_add" />
|
||||
<span class="add">添加</span>
|
||||
</span>
|
||||
</template>
|
||||
</div>
|
||||
<base-table
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.pageNo"
|
||||
:limit="listQuery.pageSize"
|
||||
:table-data="list">
|
||||
<method-btn
|
||||
v-if="!disabled"
|
||||
slot="handleBtn"
|
||||
:width="120"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick" />
|
||||
</base-table>
|
||||
<pagination
|
||||
v-show="listQuery.total > 0"
|
||||
:total="listQuery.total"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page-sizes="[5, 10, 15]"
|
||||
@pagination="getList" />
|
||||
</div>
|
||||
|
||||
<div class="drawer-body__footer">
|
||||
<el-button type="primary" @click="goback()">关闭</el-button>
|
||||
<div v-if="!disabled" class="drawer-body__footer">
|
||||
<el-button type="primary" @click="goback()">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<attr-add
|
||||
@@ -255,10 +263,10 @@ export default {
|
||||
padding: 18px;
|
||||
}
|
||||
.action_btn {
|
||||
/* float: right; */
|
||||
float: right;
|
||||
display: flex;
|
||||
justify-content: right;
|
||||
margin: 5px 15px;
|
||||
margin: -35px 15px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.add {
|
||||
@@ -312,4 +320,7 @@ export default {
|
||||
justify-content: flex-end;
|
||||
padding: 18px;
|
||||
}
|
||||
.content {
|
||||
padding: 0 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
label="操作"
|
||||
:width="250"
|
||||
:width="180"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleTableBtnClick" />
|
||||
</base-table>
|
||||
@@ -34,7 +34,7 @@
|
||||
<base-dialog
|
||||
:dialogTitle="title"
|
||||
:dialogVisible="open"
|
||||
width="35%"
|
||||
width="50%"
|
||||
@close="cancel"
|
||||
@cancel="cancel"
|
||||
@confirm="submitForm">
|
||||
@@ -44,12 +44,14 @@
|
||||
v-model="form"
|
||||
:disabled="mode == 'detail'"
|
||||
:has-files="false"
|
||||
:rows="rows" />
|
||||
:rows="rows"
|
||||
style="margin: 0 30px" />
|
||||
</base-dialog>
|
||||
<addSparts
|
||||
v-if="addOrUpdateVisible"
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="getList" />
|
||||
@refreshDataList="getList"
|
||||
@destroy="addOrUpdateVisible = false" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -79,22 +81,24 @@ export default {
|
||||
// btnName: '详情',
|
||||
// }
|
||||
// : undefined,
|
||||
this.$auth.hasPermi('equipment:spare-parts-config:update')
|
||||
this.$auth.hasPermi('equipment:spare-parts-config:addParts')
|
||||
? {
|
||||
type: 'edit',
|
||||
btnName: '修改',
|
||||
type: 'addParts',
|
||||
btnName: '添加',
|
||||
showTip: '添加备件'
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('equipment:spare-parts-config:queryParts')
|
||||
? {
|
||||
type: 'queryParts',
|
||||
btnName: '查看备件',
|
||||
btnName: '查看',
|
||||
showTip: '查看备件'
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('equipment:spare-parts-config:addParts')
|
||||
this.$auth.hasPermi('equipment:spare-parts-config:update')
|
||||
? {
|
||||
type: 'addParts',
|
||||
btnName: '添加备件',
|
||||
type: 'edit',
|
||||
btnName: '修改',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('equipment:spare-parts-config:delete')
|
||||
@@ -105,15 +109,15 @@ export default {
|
||||
: undefined,
|
||||
].filter((v) => v),
|
||||
tableProps: [
|
||||
{ prop: 'name', label: '配置名' },
|
||||
{ prop: 'lineName', label: '产线' },
|
||||
{ prop: 'sectionName', label: '工段' },
|
||||
{ prop: 'equipmentName', label: '设备名' },
|
||||
{ prop: 'equipmentCode', label: '设备编码' },
|
||||
{ prop: 'responsible', label: '负责人' },
|
||||
{ prop: 'name', label: '配置名', minWidth: 100, showOverflowtooltip: true },
|
||||
{ prop: 'lineName', label: '产线', minWidth: 100, showOverflowtooltip: true },
|
||||
{ prop: 'sectionName', label: '工段', minWidth: 100, showOverflowtooltip: true },
|
||||
{ prop: 'equipmentName', label: '设备名', minWidth: 120, showOverflowtooltip: true },
|
||||
{ prop: 'equipmentCode', label: '设备编码', minWidth: 100, showOverflowtooltip: true },
|
||||
{ prop: 'responsible', label: '负责人', minWidth: 150, showOverflowtooltip: true },
|
||||
// { prop: 'unit', label: '单位', filter: publicFormatter('unit_dict') },
|
||||
{ prop: 'description', label: '描述', subcomponent: htmls },
|
||||
{ prop: 'sparePartNumber', label: '备品备件数量' },
|
||||
{ prop: 'description', label: '描述', subcomponent: htmls, minWidth: 120, showOverflowtooltip: true },
|
||||
{ prop: 'sparePartNumber', label: '备品备件数量', width: 130 },
|
||||
// { prop: 'remark', label: '备注' },
|
||||
],
|
||||
searchBarFormConfig: [
|
||||
@@ -198,7 +202,7 @@ export default {
|
||||
prop: 'description', // TODO: 富文本
|
||||
subcomponent: Editor,
|
||||
bind: {
|
||||
'min-height': 192
|
||||
'min-height': 150
|
||||
}
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user