Merge pull request 'projects/mes-zhp' (#405) from projects/mes-zhp into projects/mes-test
Reviewed-on: #405
This commit is contained in:
commit
8f1e5212e3
@ -6,25 +6,15 @@
|
|||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer :visible.sync="visible" :show-close="false" :wrapper-closable="true" :before-close="beforeClose"
|
||||||
:visible.sync="visible"
|
class="drawer" size="60%">
|
||||||
:show-close="false"
|
|
||||||
:wrapper-closable="true"
|
|
||||||
:before-close="beforeClose"
|
|
||||||
class="drawer"
|
|
||||||
size="60%">
|
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
|
||||||
</small-title>
|
</small-title>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="visual-part">
|
<div class="visual-part">
|
||||||
<el-form
|
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
|
||||||
:model="dataForm"
|
label-width="100px" label-position="top">
|
||||||
:rules="dataRule"
|
|
||||||
ref="dataForm"
|
|
||||||
@keyup.enter.native="dataFormSubmit()"
|
|
||||||
label-width="100px"
|
|
||||||
label-position="top">
|
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="巡检单名称" prop="name">
|
<el-form-item label="巡检单名称" prop="name">
|
||||||
@ -33,34 +23,17 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="部门" prop="departmentId">
|
<el-form-item label="部门" prop="departmentId">
|
||||||
<el-select
|
<el-select v-model="dataForm.departmentId" :disabled="isdetail" :placeholder="`请选择部门`"
|
||||||
v-model="dataForm.departmentId"
|
|
||||||
:disabled="isdetail"
|
|
||||||
:placeholder="`请选择部门`"
|
|
||||||
style="width: 100%">
|
style="width: 100%">
|
||||||
<el-option
|
<el-option v-for="opt in departmentOptions" :key="opt.id" :label="opt.name" :value="opt.id" />
|
||||||
v-for="opt in departmentOptions"
|
|
||||||
:key="opt.id"
|
|
||||||
:label="opt.name"
|
|
||||||
:value="opt.id" />
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="班次" prop="groupClass">
|
<el-form-item label="班次" prop="groupClass">
|
||||||
<el-select
|
<el-select v-model="dataForm.groupClass" filterable clearable multiple :disabled="isdetail"
|
||||||
v-model="dataForm.groupClass"
|
style="width: 100%" placeholder="请选择班次">
|
||||||
filterable
|
<el-option v-for="d in groupOptions" :key="d.id" :label="d.label" :value="d.label" />
|
||||||
clearable
|
|
||||||
multiple
|
|
||||||
:disabled="isdetail"
|
|
||||||
style="width: 100%"
|
|
||||||
placeholder="请选择班次">
|
|
||||||
<el-option
|
|
||||||
v-for="d in groupOptions"
|
|
||||||
:key="d.id"
|
|
||||||
:label="d.label"
|
|
||||||
:value="d.label" />
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -68,31 +41,18 @@
|
|||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="巡检人" prop="checkPerson">
|
<el-form-item label="巡检人" prop="checkPerson">
|
||||||
<el-select
|
<!-- <el-input v-model="dataForm.checkPerson" :disabled="isdetail" placeholder="请输入巡检人" /> -->
|
||||||
v-model="dataForm.checkPerson"
|
|
||||||
:placeholder="`请选择巡检人`"
|
<el-select v-model="dataForm.checkPerson" :placeholder="`请选择巡检人`" multiple clearable
|
||||||
multiple
|
:disabled="isdetail" filterable style="width: 100%">
|
||||||
clearable
|
<el-option v-for="opt in inspectorOptions" :key="opt.value" :label="opt.label" :value="opt.label" />
|
||||||
:disabled="isdetail"
|
|
||||||
filterable
|
|
||||||
style="width: 100%">
|
|
||||||
<el-option
|
|
||||||
v-for="opt in inspectorOptions"
|
|
||||||
:key="opt.value"
|
|
||||||
:label="opt.label"
|
|
||||||
:value="opt.label" />
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="实际巡检时间" prop="actualCheckTime">
|
<el-form-item label="实际巡检时间" prop="actualCheckTime">
|
||||||
<el-date-picker
|
<el-date-picker v-model="dataForm.actualCheckTime" type="datetime" :disabled="isdetail"
|
||||||
v-model="dataForm.actualCheckTime"
|
placeholder="请选择实际巡检时间" value-format="timestamp" style="width: 100%" />
|
||||||
type="datetime"
|
|
||||||
:disabled="isdetail"
|
|
||||||
placeholder="请选择实际巡检时间"
|
|
||||||
value-format="timestamp"
|
|
||||||
style="width: 100%" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -105,10 +65,7 @@
|
|||||||
</small-title>
|
</small-title>
|
||||||
|
|
||||||
<div v-if="!isdetail" style="display: flex">
|
<div v-if="!isdetail" style="display: flex">
|
||||||
<SearchBar
|
<SearchBar :formConfigs="searchBarFormConfig" ref="attr-search-bar" @headBtnClick="handleSearchBarBtnClick" />
|
||||||
:formConfigs="searchBarFormConfig"
|
|
||||||
ref="attr-search-bar"
|
|
||||||
@headBtnClick="handleSearchBarBtnClick" />
|
|
||||||
<!-- <div class="action_btn"> -->
|
<!-- <div class="action_btn"> -->
|
||||||
<el-button type="text" class="action_btn" @click="addNew()">
|
<el-button type="text" class="action_btn" @click="addNew()">
|
||||||
<span style="display: inline-block;">
|
<span style="display: inline-block;">
|
||||||
@ -118,26 +75,13 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
</div>
|
</div>
|
||||||
<base-table
|
<base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
|
||||||
:table-props="tableProps"
|
|
||||||
:page="listQuery.pageNo"
|
|
||||||
:limit="listQuery.pageSize"
|
|
||||||
:table-data="detList">
|
:table-data="detList">
|
||||||
<method-btn
|
<method-btn v-if="!isdetail" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
|
||||||
v-if="!isdetail"
|
|
||||||
slot="handleBtn"
|
|
||||||
:width="120"
|
|
||||||
label="操作"
|
|
||||||
:method-list="tableBtn"
|
|
||||||
@clickBtn="handleClick" />
|
@clickBtn="handleClick" />
|
||||||
</base-table>
|
</base-table>
|
||||||
<pagination
|
<pagination v-show="listQuery.total > 0" :total="listQuery.total" :page.sync="listQuery.pageNo"
|
||||||
v-show="listQuery.total > 0"
|
:limit.sync="listQuery.pageSize" :page-sizes="[5, 10, 15]" @pagination="getList" />
|
||||||
:total="listQuery.total"
|
|
||||||
:page.sync="listQuery.pageNo"
|
|
||||||
:limit.sync="listQuery.pageSize"
|
|
||||||
:page-sizes="[5, 10, 15]"
|
|
||||||
@pagination="getList" />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -149,11 +93,7 @@
|
|||||||
<el-button v-else type="primary" @click="dataFormSubmit()">保存</el-button>
|
<el-button v-else type="primary" @click="dataFormSubmit()">保存</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<attr-add
|
<attr-add v-if="addOrUpdateVisible" ref="addOrUpdate" :order-id="dataForm.id" @refreshDataList="getList" />
|
||||||
v-if="addOrUpdateVisible"
|
|
||||||
ref="addOrUpdate"
|
|
||||||
:order-id="dataForm.id"
|
|
||||||
@refreshDataList="getList" />
|
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -305,15 +245,15 @@ export default {
|
|||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const workerlist = await this.$axios('/base/core-worker/listAll');
|
// const workerlist = await this.$axios('/base/core-worker/listAll');
|
||||||
if (workerlist.code == 0) {
|
// if (workerlist.code == 0) {
|
||||||
inspectorList = inspectorList.concat(
|
// inspectorList = inspectorList.concat(
|
||||||
workerlist.data.map((item) => ({
|
// workerlist.data.map((item) => ({
|
||||||
label: item.name,
|
// label: item.name,
|
||||||
value: item.id,
|
// value: item.id,
|
||||||
}))
|
// }))
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
this.inspectorOptions = inspectorList;
|
this.inspectorOptions = inspectorList;
|
||||||
// const res1 = await groupClassesListAll();
|
// const res1 = await groupClassesListAll();
|
||||||
// this.groupOptions = res1.data || [];
|
// this.groupOptions = res1.data || [];
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="默认巡检结果" prop="resultType">
|
<el-form-item label="默认巡检结果" prop="resultType">
|
||||||
<el-select v-model="dataForm.resultType" placeholder="请选择默认保养结果">
|
<el-select v-model="dataForm.resultType" placeholder="请选择默认保养结果" @change="handleClear">
|
||||||
<el-option v-for="dict in resultList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
<el-option v-for="dict in resultList" :key="dict.id" :label="dict.name" :value="dict.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -38,13 +38,16 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row v-else-if="dataForm.resultType === 2" :gutter="24">
|
<el-row v-else-if="dataForm.resultType === 2" :gutter="24">
|
||||||
<el-col :span="12">
|
<el-col :span="11">
|
||||||
<el-form-item prop="minValue">
|
<el-form-item prop="minValue">
|
||||||
<el-input oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.minValue" placeholder="请输入最小值" />
|
<el-input oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.minValue" placeholder="请输入最小值" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="4">
|
||||||
<el-form-item prop="maxValue">
|
—————
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="9">
|
||||||
|
<el-form-item prop="maxValue" label-width="20">
|
||||||
<el-input @change="handleChange" oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.maxValue"
|
<el-input @change="handleChange" oninput="value=value.replace(/[^\-\d.]/g, '')" v-model="dataForm.maxValue"
|
||||||
placeholder="请输入最大值" />
|
placeholder="请输入最大值" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -114,6 +117,11 @@ export default {
|
|||||||
console.log('我看看', this.dataForm)
|
console.log('我看看', this.dataForm)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleClear() {
|
||||||
|
this.dataForm.minValue = undefined
|
||||||
|
this.dataForm.maxValue = undefined
|
||||||
|
this.dataForm.maintainResult = undefined
|
||||||
|
},
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 物料列表
|
// 物料列表
|
||||||
const res = await getList();
|
const res = await getList();
|
||||||
|
Loading…
Reference in New Issue
Block a user