Commit da16ed35 authored by kzy's avatar kzy

merege 盘点

parents b1fe36ce 371621fc
This diff is collapsed.
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true"> <el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true">
<el-form-item label="设备名称" prop="roleName"> <el-form-item label="设备编码" prop="equipmentCode">
<el-input <el-input
v-model="queryParams.roleName" v-model="queryParams.equipmentCode"
placeholder="请输入设备名称" placeholder="请输入设备编码"
clearable clearable
:maxlength="30" :maxlength="30"
size="small" size="small"
...@@ -12,10 +12,20 @@ ...@@ -12,10 +12,20 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="设备编码" prop="roleKey"> <el-form-item label="lot" prop="lot">
<el-input <el-input
v-model="queryParams.roleKey" v-model="queryParams.roleKey"
placeholder="请输入设备编码" placeholder="请输入设备lot"
clearable
size="small"
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="位置" prop="location">
<el-input
v-model="queryParams.location"
placeholder="请输入设备位置"
clearable clearable
size="small" size="small"
style="width: 150px" style="width: 150px"
...@@ -40,43 +50,46 @@ ...@@ -40,43 +50,46 @@
<div class="placeholder" /> <div class="placeholder" />
<div style="padding:5px 10px"> <div style="padding:5px 10px">
<div class="mb12 font-small-bold">设备管理列表</div> <div class="mb12 font-small-bold">设备管理列表</div>
<el-table v-loading="loading" border :data="roleList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" border :data="equipmentList" @selection-change="handleSelectionChange">
<el-table-column label="名称" prop="roleName" :show-overflow-tooltip="true"> <el-table-column type="selection" width="55" />
<el-table-column type="index" label="序号" width="80" />
<el-table-column label="编码" prop="equipmentCode" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleName || '-' }} {{ scope.row.equipmentCode || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="编码" prop="roleKey"> <el-table-column label="lot" prop="lot" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleKey || '-' }} {{ scope.row.lot || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="lot" prop="roleSort"> <el-table-column label="位置" prop="location">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleSort || '-' }} {{ scope.row.location || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="位置" prop="roleSort"> <el-table-column label="厚度" prop="thickness">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleSort || '-' }} {{ scope.row.thickness || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="厚度" prop="roleSort"> <el-table-column label="创建员" prop="createBy">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleSort || '-' }} {{ scope.row.createBy || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建人" prop="roleSort"> <el-table-column label="操作时间" :show-overflow-tooltip="true" align="center" prop="createTime">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleSort || '-' }} <span>{{ scope.row.createTime | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" :show-overflow-tooltip="true" align="center" prop="createTime"> <el-table-column label="操作" class-name="small-padding fixed-width" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.createDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span> <el-button :type="typeParent" :size="size" @click="handleDetail(scope.row)">
详情
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<pagination <pagination
...@@ -130,6 +143,29 @@ ...@@ -130,6 +143,29 @@
<el-button type="primary" @click="submitForm">确 定</el-button> <el-button type="primary" @click="submitForm">确 定</el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- TODO: 单项详情信息表单配置 -->
<el-dialog class="aboutSingleDetails" :title="title" :visible.sync="openDetails" width="700px" append-to-body>
<el-form ref="formDetails" :model="singleDetails" size="small" label-width="90px">
<el-form-item label="编码:" prop="processName">
<el-input v-model.trim="singleDetails.equipmentCode" :readonly="true" />
</el-form-item>
<el-form-item label="lot:" prop="workshop">
<el-input v-model.trim="singleDetails.lot" :readonly="true" />
</el-form-item>
<el-form-item label="位置:" prop="location">
<el-input v-model.trim="singleDetails.location" :readonly="true" />
</el-form-item>
<el-form-item label="厚度:" prop="thickness">
<el-input v-model.trim="singleDetails.thickness" :readonly="true" />
</el-form-item>
<el-form-item label="创建时间:" prop="createTime">
<el-input v-model.trim="singleDetails.createTime" :readonly="true" />
</el-form-item>
<el-form-item label="创建人:" prop="createBy">
<el-input v-model.trim="singleDetails.createBy" :readonly="true" />
</el-form-item>
</el-form>
</el-dialog>
</div> </div>
</template> </template>
...@@ -144,6 +180,20 @@ export default { ...@@ -144,6 +180,20 @@ export default {
components: { Coolbutton }, components: { Coolbutton },
data() { data() {
return { return {
// TODO: 表单里的单项详情参数
singleDetails: {
equipmentName: '',
equipmentCode: '',
lot: '',
location: '',
thickness: '',
createBy: '',
createTime: ''
},
// 是否显示弹出层(数据详情)
openDetails: false,
// TODO: 模拟测试数据
equipmentList: [{ equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '002', lot: 'xxx', location: '位置02', thickness: '70', createBy: '操作员02', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { equipmentCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }],
check: '盘点', check: '盘点',
typeParent: 'text', typeParent: 'text',
typePrimary: 'primary', typePrimary: 'primary',
...@@ -282,6 +332,13 @@ export default { ...@@ -282,6 +332,13 @@ export default {
// }); // });
}, },
methods: { methods: {
// TODO: 获取所选行详情信息操作
handleDetail(row) {
this.singleDetails = this.formReset
this.singleDetails = row
this.title = '详情信息'
this.openDetails = !this.openDetails
},
handelTab(i, e) { handelTab(i, e) {
const that = this const that = this
if (!that.$refs['input' + i]) { if (!that.$refs['input' + i]) {
...@@ -608,6 +665,18 @@ export default { ...@@ -608,6 +665,18 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.aboutSingleDetails{
.el-form-item{
.el-input >>> .el-input__inner {
-webkit-appearance: none;
background-color: #FFF;
background-image: none;
border-radius: 4px;
border: 0;
width: 100%;
}
}
}
.app-container { .app-container {
font-size: 18px; font-size: 18px;
padding: 0; padding: 0;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true"> <el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true">
<el-form-item label="设备名称" prop="roleName"> <el-form-item label="编码" prop="equipmentCode">
<el-input <el-input
v-model="queryParams.roleName" v-model="queryParams.equipmentCode"
placeholder="请输入设备名称" placeholder="请输入编码"
clearable clearable
:maxlength="30" :maxlength="30"
size="small" size="small"
...@@ -12,10 +12,20 @@ ...@@ -12,10 +12,20 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="设备编码" prop="roleKey"> <el-form-item label="lot" prop="lot">
<el-input <el-input
v-model="queryParams.roleKey" v-model="queryParams.roleKey"
placeholder="请输入设备编码" placeholder="请输入设备lot"
clearable
size="small"
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="位置" prop="location">
<el-input
v-model="queryParams.location"
placeholder="请输入设备位置"
clearable clearable
size="small" size="small"
style="width: 150px" style="width: 150px"
...@@ -30,7 +40,7 @@ ...@@ -30,7 +40,7 @@
<coolbutton <coolbutton
style="padding: 8px 7px;" style="padding: 8px 7px;"
:type="typePrimary" :type="typePrimary"
:name="check" :name="addProcess"
:size="smallSize" :size="smallSize"
:icon="addIcon" :icon="addIcon"
/> />
...@@ -40,40 +50,42 @@ ...@@ -40,40 +50,42 @@
<div class="placeholder" /> <div class="placeholder" />
<div style="padding:5px 10px"> <div style="padding:5px 10px">
<div class="mb12 font-small-bold">设备管理列表</div> <div class="mb12 font-small-bold">设备管理列表</div>
<el-table v-loading="loading" border :data="roleList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" border :data="processList" @selection-change="handleSelectionChange">
<el-table-column label="名称" prop="roleName" :show-overflow-tooltip="true"> <el-table-column type="selection" width="55" />
<el-table-column type="index" label="序号" width="80" />
<el-table-column label="工序名称" prop="processCode" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleName || '-' }} {{ scope.row.processCode || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="编码" prop="roleKey"> <el-table-column label="编码" prop="lot">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleKey || '-' }} {{ scope.row.lot || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="lot" prop="roleSort"> <el-table-column label="位置" prop="location">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleSort || '-' }} {{ scope.row.location || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="位置" prop="roleSort"> <el-table-column label="位置" prop="location">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleSort || '-' }} {{ scope.row.location || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="厚度" prop="roleSort"> <el-table-column label="厚度" prop="thickness">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleSort || '-' }} {{ scope.row.thickness || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建人" prop="roleSort"> <el-table-column label="创建人" prop="createBy">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.roleSort || '-' }} {{ scope.row.createBy || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" :show-overflow-tooltip="true" align="center" prop="createTime"> <el-table-column label="创建时间" :show-overflow-tooltip="true" align="center" prop="createTime">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.createDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span> <span>{{ scope.row.createTime | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -100,9 +112,6 @@ ...@@ -100,9 +112,6 @@
<el-input-number v-model="form.roleSort" style="width: 100%" controls-position="right" :min="0" /> <el-input-number v-model="form.roleSort" style="width: 100%" controls-position="right" :min="0" />
</el-form-item> </el-form-item>
<el-form-item label="设备批次"> <el-form-item label="设备批次">
<!-- <el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">展开/折叠</el-checkbox>-->
<!-- <el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">全选/全不选</el-checkbox>-->
<!-- <el-checkbox v-model="form.menuCheckStrictly" @change="handleCheckedTreeConnect($event, 'menu')">父子联动</el-checkbox>-->
<el-tree <el-tree
ref="menu" ref="menu"
class="tree-border" class="tree-border"
...@@ -144,7 +153,21 @@ export default { ...@@ -144,7 +153,21 @@ export default {
components: { Coolbutton }, components: { Coolbutton },
data() { data() {
return { return {
check: '盘点', // TODO: 表单里的单项详情参数
singleDetails: {
equipmentName: '',
equipmentCode: '',
lot: '',
location: '',
thickness: '',
createBy: '',
createTime: ''
},
// 是否显示弹出层(数据详情)
openDetails: false,
// TODO: 模拟测试数据
processList: [{ processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '002', lot: 'xxx', location: '位置02', thickness: '70', createBy: '操作员02', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }, { processCode: '001', lot: 'xxx', location: '位置01', thickness: '50', createBy: '操作员01', createTime: new Date() }],
addProcess: '入库',
typeParent: 'text', typeParent: 'text',
typePrimary: 'primary', typePrimary: 'primary',
typeSuccess: 'success', typeSuccess: 'success',
...@@ -282,6 +305,13 @@ export default { ...@@ -282,6 +305,13 @@ export default {
// }); // });
}, },
methods: { methods: {
// TODO: 获取所选行详情信息操作
handleDetail(row) {
this.singleDetails = this.formReset
this.singleDetails = row
this.title = '详情信息'
this.openDetails = !this.openDetails
},
handelTab(i, e) { handelTab(i, e) {
const that = this const that = this
if (!that.$refs['input' + i]) { if (!that.$refs['input' + i]) {
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
</el-form> </el-form>
<div class="placeholder"></div> <div class="placeholder"></div>
<div class="Role" style="width: 100%; height: 600px; display: flex; padding-left: 100px"> <div class="Role" style="width: 100%; height: 600px; display: flex; padding-left: 100px">
<!--左边两个图--> <!--左边两个图-->
<div class="left-charts" style="width: 50%; display: flex; flex-direction: column;"> <div class="left-charts" style="width: 50%; display: flex; flex-direction: column;">
<div id="myChart1" style="flex: 1; margin-bottom: 100px;"></div> <div id="myChart1" style="flex: 1; margin-bottom: 100px;"></div>
......
...@@ -41,7 +41,13 @@ ...@@ -41,7 +41,13 @@
<!-- TODO: 以下为基础工序管理列表 --> <!-- TODO: 以下为基础工序管理列表 -->
<div class="mb12 font-small-bold">基础工序管理列表</div> <div class="mb12 font-small-bold">基础工序管理列表</div>
<el-table v-loading="loading" border :data="roleList" @selection-change="handleSelectionChange"> <el-table
v-loading="loading"
class="processList"
border
:data="processList"
@selection-change="handleSelectionChange"
>
<el-table-column type="index" label="序号" width="50" /> <el-table-column type="index" label="序号" width="50" />
<el-table-column label="工序名称" prop="processName" :show-overflow-tooltip="true"> <el-table-column label="工序名称" prop="processName" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -53,29 +59,36 @@ ...@@ -53,29 +59,36 @@
{{ scope.row.workshop || '-' }} {{ scope.row.workshop || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" :show-overflow-tooltip="true" align="center" prop="createTime"> <el-table-column label="操作时间" :show-overflow-tooltip="true" align="center" prop="createTime">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.createTime | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span> <span>{{ scope.row.createTime | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建人" prop="createBy"> <el-table-column label="操作人" prop="createBy">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.createBy || '-' }} {{ scope.row.createBy || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width" width="240px"> <el-table-column
label="操作"
class-name="small-padding fixed-width"
width="180px"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button :type="typeParent" :size="size" @click="handleDetail(scope.row)"> <div class="processListBtns">
详情 <el-button :type="typeParent" :size="size" @click="handleDetail(scope.row)">
</el-button> 详情
<el-button :type="typeParent" :size="size" @click="handleUpdate(scope.row)"> </el-button>
{{ updataName }} <el-button :type="typeParent" :size="size" @click="handleUpdate(scope.row)">
</el-button> {{ updataName }}
<el-button </el-button>
size="mini" <el-button
type="text" size="mini"
@click="handleDelete(scope.row)" type="text"
>删除</el-button> @click="handleDelete(scope.row)"
>删除
</el-button>
</div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -97,8 +110,8 @@ ...@@ -97,8 +110,8 @@
<el-form-item label="工厂车间" prop="workshop"> <el-form-item label="工厂车间" prop="workshop">
<el-input v-model.trim="form.workshop" show-word-limit :maxlength="30" placeholder="请输入工厂车间" /> <el-input v-model.trim="form.workshop" show-word-limit :maxlength="30" placeholder="请输入工厂车间" />
</el-form-item> </el-form-item>
<el-form-item label="创建人" prop="createBy"> <el-form-item label="操作人" prop="createBy">
<el-input v-model.trim="form.createBy" :maxlength="30" show-word-limit placeholder="请输入创建人" /> <el-input v-model.trim="form.createBy" :maxlength="30" show-word-limit placeholder="请输入操作人" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -116,10 +129,14 @@ ...@@ -116,10 +129,14 @@
<el-form-item label="工厂车间:" prop="workshop"> <el-form-item label="工厂车间:" prop="workshop">
<el-input v-model.trim="singleDetails.workshop" :readonly="isReadOnly" /> <el-input v-model.trim="singleDetails.workshop" :readonly="isReadOnly" />
</el-form-item> </el-form-item>
<el-form-item label="创建时间:" prop="createTime"> <el-form-item label="操作时间:" prop="createTime">
<el-input v-model.trim="singleDetails.createTime" :readonly="isReadOnly" /> <!--
TODO: el-input 里不能调用全局日期过滤器 transformDateByFormat('YYYY-MM-DD HH:mm')
<el-input v-model.trim="singleDetails.createTime" :readonly="isReadOnly" />
-->
{{ singleDetails.createTime | transformDateByFormat('YYYY-MM-DD HH:mm') }}
</el-form-item> </el-form-item>
<el-form-item label="创建人:" prop="createBy"> <el-form-item label="操作人:" prop="createBy">
<el-input v-model.trim="singleDetails.createBy" :readonly="isReadOnly" /> <el-input v-model.trim="singleDetails.createBy" :readonly="isReadOnly" />
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -131,6 +148,7 @@ ...@@ -131,6 +148,7 @@
<script> <script>
// TODO: 导入外部已经封装好的button组件 // TODO: 导入外部已经封装好的button组件
import Coolbutton from '@/components/coolbutton' import Coolbutton from '@/components/coolbutton'
export default { export default {
name: 'Role', name: 'Role',
components: { Coolbutton }, components: { Coolbutton },
...@@ -159,13 +177,15 @@ export default { ...@@ -159,13 +177,15 @@ export default {
multiple: true, multiple: true,
// 总条数 // 总条数
total: 0, total: 0,
// 角色表格数据 // TODO: 工序表格数据
roleList: [], processList: [],
// TODO: 模拟数据中转表 (为了解决模拟数据的查询问题)
toList: [],
// 弹出层标题 // 弹出层标题
title: '', title: '',
// 是否显示弹出层 // TODO: 是否显示弹出层
open: false, open: false,
// 是否显示弹出层(数据详情) // TODO: 是否显示弹出层(数据详情)
openDetails: false, openDetails: false,
// 日期范围 // 日期范围
// dateRange: [], // dateRange: [],
...@@ -175,13 +195,12 @@ export default { ...@@ -175,13 +195,12 @@ export default {
menuNodeAll: false, menuNodeAll: false,
deptExpand: true, deptExpand: true,
deptNodeAll: false, deptNodeAll: false,
// 查询参数 // TODO: 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
processName: undefined, processName: '',
workshop: undefined, workshop: ''
flag: undefined
}, },
defaultProps: {}, defaultProps: {},
// TODO: 表单参数 // TODO: 表单参数
...@@ -213,9 +232,26 @@ export default { ...@@ -213,9 +232,26 @@ export default {
createBy: '' createBy: ''
}, },
// TODO: 模拟测试数据 // TODO: 模拟测试数据
simulateProcessList: [{ processName: '打磨', workshop: '车间1', flag: 1, createTime: new Date(), updataTime: new Date(), createBy: '张三' }, { processName: '焊接', workshop: '车间2', flag: 2, createTime: new Date(), updataTime: new Date(), createBy: '李四' }], simulateProcessList: [
{
processName: '打磨',
workshop: '车间1',
flag: 1,
createTime: new Date(),
updataTime: new Date(),
createBy: '张三'
},
{
processName: '焊接',
workshop: '车间2',
flag: 2,
createTime: new Date(),
updataTime: new Date(),
createBy: '李四'
}
],
// 表单校验 // TODO: 表单校验
rules: { rules: {
processName: [ processName: [
{ required: true, message: '请输入工序名称', trigger: 'blur' }, { required: true, message: '请输入工序名称', trigger: 'blur' },
...@@ -250,11 +286,37 @@ export default { ...@@ -250,11 +286,37 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
/** 查询角色列表 */ /** TODO: 查询列表 */
getList() { getList() {
this.loading = true this.loading = true
this.roleList = this.simulateProcessList this.reset()
console.log(this.roleList) // TODO: 此处为模拟数据的,根据不同条件去查询的过滤方法,可以删除!
if (this.queryParams.workshop === '' && this.queryParams.processName !== '') {
for (const ps of this.simulateProcessList) {
if (ps.processName === this.queryParams.processName) {
this.toList.push(ps)
}
}
} else if (this.queryParams.workshop !== '' && this.queryParams.processName === '') {
for (const ps of this.simulateProcessList) {
if (ps.workshop === this.queryParams.workshop) {
this.toList.push(ps)
}
}
} else if (this.queryParams.workshop !== '' && this.queryParams.processName !== '') {
for (const ps of this.simulateProcessList) {
if (ps.workshop === this.queryParams.workshop && ps.processName === this.queryParams.processName) {
this.toList.push(ps)
}
}
} else {
this.toList = this.simulateProcessList
}
// DONE: 此上为模拟数据的,根据不同条件去查询的过滤方法,可以删除!
this.processList = this.toList
this.total = this.toList.length
console.log(this.processList)
this.loading = false this.loading = false
}, },
// 取消按钮 // 取消按钮
...@@ -265,6 +327,7 @@ export default { ...@@ -265,6 +327,7 @@ export default {
// 表单重置 // 表单重置
reset() { reset() {
// TODO: 将模拟数据的空对象赋值给表单对象,达成清空填写表单的效果 // TODO: 将模拟数据的空对象赋值给表单对象,达成清空填写表单的效果
this.toList = []
this.form = { this.form = {
processName: '', processName: '',
workshop: '', workshop: '',
...@@ -278,6 +341,7 @@ export default { ...@@ -278,6 +341,7 @@ export default {
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1
this.getList() this.getList()
console.log('this is queryParams', this.queryParams)
}, },
/** TODO: 重置按钮操作 */ /** TODO: 重置按钮操作 */
resetQuery() {}, resetQuery() {},
...@@ -399,14 +463,23 @@ export default { ...@@ -399,14 +463,23 @@ export default {
margin-left: 15px; margin-left: 15px;
} }
} }
.el-divider--vertical{
.el-divider--vertical {
height: 12em; height: 12em;
width: 4px; width: 4px;
} }
.aboutSingleDetails{ //TODO: 这里是控制内容列表的样式
.el-form-item{ .processListBtns {
.el-input >>> .el-input__inner { .el-button {
margin: 0 7px;
}
}
//TODO: readOnly里去删除el-input的边框样式
.aboutSingleDetails {
.el-form-item {
.el-input > > > .el-input__inner {
-webkit-appearance: none; -webkit-appearance: none;
background-color: #FFF; background-color: #FFF;
background-image: none; background-image: none;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment