Commit ab996baa authored by kzy's avatar kzy

盘点和废弃的模糊搜索

parent c4634bc9
import request from '@/utils/request'
import Qs from 'qs'
// 查询角色列表
export function listCheck(query) {
return request({
url: '/wbwarehouse/queryWbWarehouseByPagination',
method: 'get',
params: query
})
}
export function getlistRole() {
return request({
url: 'system/role/listAll',
method: 'get'
})
}
// 查询角色详细
export function getRole(businessId) {
return request({
url: '/system/role/detail/' + businessId,
method: 'get'
})
}
// 新增角色
export function addRole(data) {
data = Qs.stringify(data)
return request({
url: '/system/role/add',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
}
// 修改角色
export function updateRole(data) {
const businessId = data.businessId
data = Qs.stringify(data)
return request({
url: '/system/role/update/' + businessId,
method: 'put',
data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
}
// 角色数据权限
export function dataScope(data) {
data = Qs.stringify(data)
return request({
url: '/system/role/dataScope',
method: 'put',
data,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
}
// 角色状态修改
export function changeRoleStatus(businessId, flag) {
const data = {
businessId,
flag
}
return request({
url: '/system/role/changeStatus',
method: 'put',
params: data
})
}
// 删除角色
export function delRole(roleId) {
return request({
url: '/system/role/deleteLogical/' + roleId,
method: 'delete'
})
}
// 导出角色
export function exportRole(query) {
return request({
url: '/system/role/export',
method: 'get',
params: query,
responseType: 'blob'
})
}
<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="equipmentCode"> <el-form-item label="pn" prop="pn">
<el-input <el-input
v-model="queryParams.equipmentCode" v-model="queryParams.pn"
placeholder="请输入设备编码" placeholder="请输入pn"
clearable clearable
:maxlength="30" :maxlength="30"
size="small" size="small"
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="位置" prop="location"> <el-form-item label="位置" prop="plocation">
<el-input <el-input
v-model="queryParams.location" v-model="queryParams.plocation"
placeholder="请输入设备位置" placeholder="请输入设备位置"
clearable clearable
size="small" size="small"
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<el-table v-loading="loading" border :data="equipmentList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" border :data="equipmentList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column type="index" label="序号" width="80" /> <el-table-column type="index" label="序号" width="80" />
<el-table-column label="编码" prop="pn" width="120"> <el-table-column label="pn" prop="pn" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.pn || '-' }} {{ scope.row.pn || '-' }}
</template> </template>
...@@ -69,12 +69,12 @@ ...@@ -69,12 +69,12 @@
{{ scope.row.plocation || '-' }} {{ scope.row.plocation || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="厚度" prop="thickness"> <el-table-column label="厚度" prop="phd">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.thickness || '-' }} {{ scope.row.phd || '-' }}
</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>
......
<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="equipmentCode"> <el-form-item label="pn" prop="pn">
<el-input <el-input
v-model="queryParams.equipmentCode" v-model="queryParams.equipmentCode"
placeholder="请输入设备编码" placeholder="请输入pn"
clearable clearable
:maxlength="30" :maxlength="30"
size="small" size="small"
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
<el-table v-loading="loading" border :data="equipmentList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" border :data="equipmentList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column type="index" label="序号" width="80" /> <el-table-column type="index" label="序号" width="80" />
<el-table-column label="编码" prop="pn" width="120"> <el-table-column label="pn" prop="pn" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.pn || '-' }} {{ scope.row.pn || '-' }}
</template> </template>
...@@ -69,9 +69,9 @@ ...@@ -69,9 +69,9 @@
{{ scope.row.plocation || '-' }} {{ scope.row.plocation || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="厚度" prop="thickness"> <el-table-column label="厚度" prop="phd">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.thickness || '-' }} {{ scope.row.phd || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建员" prop="createBy"> <el-table-column label="创建员" prop="createBy">
......
<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="equipmentCode"> <el-form-item label="pn" prop="pn">
<el-input <el-input
v-model="queryParams.equipmentCode" v-model="queryParams.pn"
placeholder="请输入设备编码" placeholder="请输入pn"
clearable clearable
:maxlength="30" :maxlength="30"
size="small" size="small"
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</el-form-item> </el-form-item>
<el-form-item label="lot" prop="lot"> <el-form-item label="lot" prop="lot">
<el-input <el-input
v-model="queryParams.roleKey" v-model="queryParams.lot"
placeholder="请输入设备lot" placeholder="请输入设备lot"
clearable clearable
size="small" size="small"
...@@ -22,9 +22,9 @@ ...@@ -22,9 +22,9 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="位置" prop="location"> <el-form-item label="位置" prop="plocation">
<el-input <el-input
v-model="queryParams.location" v-model="queryParams.plocation"
placeholder="请输入设备位置" placeholder="请输入设备位置"
clearable clearable
size="small" size="small"
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
:type="typePrimary" :type="typePrimary"
:size="smallSize" :size="smallSize"
:icon="addIcon" :icon="addIcon"
> >开始盘点
{{ check }} {{ check }}
</el-button> </el-button>
</el-form-item> </el-form-item>
...@@ -52,11 +52,11 @@ ...@@ -52,11 +52,11 @@
<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="equipmentList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" border :data="equipmentList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" /> --> <el-table-column type="selection" width="55" />
<el-table-column type="index" label="序号" width="80" /> <el-table-column type="index" label="序号" width="80" />
<el-table-column label="编码" prop="equipmentCode" width="120"> <el-table-column label="pn" prop="pn" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.equipmentCode || '-' }} {{ scope.row.pn || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="lot" prop="lot" width="120"> <el-table-column label="lot" prop="lot" width="120">
...@@ -64,24 +64,24 @@ ...@@ -64,24 +64,24 @@
{{ scope.row.lot || '-' }} {{ scope.row.lot || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="位置" prop="location"> <el-table-column label="位置" prop="plocation">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.location || '-' }} {{ scope.row.plocation || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="厚度" prop="thickness"> <el-table-column label="厚度" prop="phd">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.thickness || '-' }} {{ scope.row.phd || '-' }}
</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="操作时间" :show-overflow-tooltip="true" align="center" prop="createTime"> <el-table-column label="操作时间" :show-overflow-tooltip="true" align="center" prop="createDate">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.createTime | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span> <span>{{ scope.row.createDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width" width="150px"> <el-table-column label="操作" class-name="small-padding fixed-width" width="150px">
...@@ -96,21 +96,20 @@ ...@@ -96,21 +96,20 @@
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
>废弃</el-button> >废弃</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<pagination <pagination
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.page"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.rows"
@pagination="getList" @pagination="getList"
/> />
<!-- 添加或修改设备配置对话框 --> <!-- 添加或修改设备配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :rules="rules" size="small" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" size="small" label-width="80px">
<el-form-item label="名称" prop="roleName"> <el-form-item label="名称" prop="roleName">
<el-input v-model.trim="form.roleName" show-word-limit :maxlength="30" placeholder="请输入设备名称" /> <el-input v-model.trim="form.roleName" show-word-limit :maxlength="30" placeholder="请输入设备名称" />
</el-form-item> </el-form-item>
...@@ -154,20 +153,20 @@ ...@@ -154,20 +153,20 @@
<!-- TODO: 单项详情信息表单配置 --> <!-- TODO: 单项详情信息表单配置 -->
<el-dialog class="aboutSingleDetails" :title="title" :visible.sync="openDetails" width="700px" append-to-body> <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 ref="formDetails" :model="singleDetails" size="small" label-width="90px">
<el-form-item label="编码:" prop="processName"> <el-form-item label="编码:" prop="pn">
<el-input v-model.trim="singleDetails.equipmentCode" :readonly="true" /> <el-input v-model.trim="singleDetails.pn" :readonly="true" />
</el-form-item> </el-form-item>
<el-form-item label="lot:" prop="workshop"> <el-form-item label="lot:" prop="workshop">
<el-input v-model.trim="singleDetails.lot" :readonly="true" /> <el-input v-model.trim="singleDetails.lot" :readonly="true" />
</el-form-item> </el-form-item>
<el-form-item label="位置:" prop="location"> <el-form-item label="位置:" prop="plocation">
<el-input v-model.trim="singleDetails.location" :readonly="true" /> <el-input v-model.trim="singleDetails.plocation" :readonly="true" />
</el-form-item> </el-form-item>
<el-form-item label="厚度:" prop="thickness"> <el-form-item label="厚度:" prop="thickness">
<el-input v-model.trim="singleDetails.thickness" :readonly="true" /> <el-input v-model.trim="singleDetails.thickness" :readonly="true" />
</el-form-item> </el-form-item>
<el-form-item label="操作时间:" prop="createTime"> <el-form-item label=" 操作时间:" prop="createDate">
{{ singleDetails.createTime | transformDateByFormat('YYYY-MM-DD HH:mm') }} <el-input v-model.trim="singleDetails.createDate" :readonly="true" />
</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="true" /> <el-input v-model.trim="singleDetails.createBy" :readonly="true" />
...@@ -175,10 +174,10 @@ ...@@ -175,10 +174,10 @@
</el-form> </el-form>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { import {
addRole, addRole,
changeRoleStatus, changeRoleStatus,
dataScope, dataScope,
...@@ -187,11 +186,13 @@ ...@@ -187,11 +186,13 @@
getRole, getRole,
listRole, listRole,
updateRole updateRole
} from '@/api/system/role' } from '@/api/system/role'
import {roleMenuTreeselect, roleMenuTreeselectMC, treeselect as menuTreeselect} from '@/api/system/menu' import {listCheck} from '@/api/equipment/check'
import {roleDeptTreeselect, treeselect as deptTreeselect} from '@/api/system/dept'
// import { getRolesByInsId } from '../../../api/businessManage/template' import {roleMenuTreeselect, roleMenuTreeselectMC, treeselect as menuTreeselect} from '@/api/system/menu'
export default { import {roleDeptTreeselect, treeselect as deptTreeselect} from '@/api/system/dept'
// import { getRolesByInsId } from '../../../api/businessManage/template'
export default {
name: 'Role', name: 'Role',
data() { data() {
return { return {
...@@ -207,9 +208,9 @@ ...@@ -207,9 +208,9 @@
}, },
// 是否显示弹出层(数据详情) // 是否显示弹出层(数据详情)
openDetails: false, openDetails: false,
// TODO: 模拟测试数据 // // 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() }], // 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',
typeSuccess: 'success', typeSuccess: 'success',
...@@ -295,11 +296,12 @@ ...@@ -295,11 +296,12 @@
tOptions: [], tOptions: [],
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, page: 1,
pageSize: 10, rows: 10,
roleName: undefined, roleName: undefined,
roleKey: undefined, roleKey: undefined,
flag: undefined flag: undefined,
}, },
// 表单参数 // 表单参数
form: { form: {
...@@ -368,9 +370,9 @@ ...@@ -368,9 +370,9 @@
/** 查询角色列表 */ /** 查询角色列表 */
getList() { getList() {
this.loading = true this.loading = true
listRole(this.queryParams).then( listCheck(this.queryParams).then(
response => { response => {
this.roleList = response.rows this.equipmentList = response.rows
this.total = response.total this.total = response.total
this.loading = false this.loading = false
} }
...@@ -507,7 +509,7 @@ ...@@ -507,7 +509,7 @@
}, },
/** 查询按钮操作 */ /** 查询按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1 this.queryParams.page = 1
this.getList() this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
...@@ -517,11 +519,11 @@ ...@@ -517,11 +519,11 @@
this.handleQuery() this.handleQuery()
}, },
// 多选框选中数据 // 多选框选中数据
// handleSelectionChange(selection) { handleSelectionChange(selection) {
// this.ids = selection.map(item => item.roleId) this.ids = selection.map(item => item.roleId)
// this.single = selection.length !== 1 this.single = selection.length !== 1
// this.multiple = !selection.length this.multiple = !selection.length
// }, },
// // 树权限(父子联动) // // 树权限(父子联动)
// handleCheckedTreeConnect(value, type) { // handleCheckedTreeConnect(value, type) {
// if (type === 'menu') { // if (type === 'menu') {
...@@ -677,10 +679,10 @@ ...@@ -677,10 +679,10 @@
}) })
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.aboutSingleDetails{ .aboutSingleDetails{
.el-form-item{ .el-form-item{
.el-input >>> .el-input__inner { .el-input >>> .el-input__inner {
-webkit-appearance: none; -webkit-appearance: none;
...@@ -691,8 +693,8 @@ ...@@ -691,8 +693,8 @@
width: 100%; width: 100%;
} }
} }
} }
.app-container { .app-container {
font-size: 18px; font-size: 18px;
padding: 0; padding: 0;
...@@ -711,11 +713,10 @@ ...@@ -711,11 +713,10 @@
.el-switch { .el-switch {
margin-left: 15px; margin-left: 15px;
} }
} }
.el-divider--vertical { .el-divider--vertical {
height: 12em; height: 12em;
width: 4px; width: 4px;
} }
</style> </style>
\ No newline at end of file
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