Commit b90492fa authored by AiNoeLiYa's avatar AiNoeLiYa

补全了设备库的空缺页面

Signed-off-by: 's avatarAiNoeLiYa <jzbcxy@gmail.com>
parent aed751cf
import request from '@/utils/request' import request from '@/utils/request'
export function listLog() { export function listLog(queryParams) {
return request({ return request({
url: '/wbwarehouselog/queryWbWarehouseLogs', url: '/wbwarehouselog/queryWbWarehouseLogByPagination',
method: 'get' method: 'get',
params: queryParams
}) })
} }
...@@ -2,56 +2,49 @@ ...@@ -2,56 +2,49 @@
<div class="app-container"> <div class="app-container">
<el-form v-show="showSearch" ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true" label-width="68px"> <el-form v-show="showSearch" ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true" label-width="68px">
<el-form-item label="设备名称" prop="userName"> <el-form-item label="设备编码" prop="pn">
<el-input <el-input
v-model="queryParams.username" v-model="queryParams.pn"
placeholder="请输入设备名称" placeholder="请输入设备编码"
clearable
:maxlength="30"
style="width: 240px;"
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="Pn" prop="userName">
<el-input
v-model="queryParams.username"
placeholder="Pn"
clearable clearable
:maxlength="30" :maxlength="30"
style="width: 240px;" style="width: 150px;"
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="设备编码" prop=""> <el-form-item label="操作人" prop="updateBy">
<el-input <el-input
v-model="queryParams.username" v-model="queryParams.updateBy"
placeholder="请输入设备编码" placeholder="请输入操作人"
clearable clearable
:maxlength="30" :maxlength="30"
style="width: 240px;" style="width: 150px;"
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-select v-model="selectValue" filterable placeholder="请选择库类型"> <el-select v-model="queryParams.selectValue" filterable placeholder="请选择库类型">
<el-option <el-option
v-for="option in selectOptions" v-for="option in selectOptions"
:key="option.value" :key="option.value"
:label="option.label" :label="option.label"
:value="option.value"> :value="option.value"
</el-option> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" icon="el-icon-search" @click="handleQuery">查询</el-button> <el-button type="primary" size="small" icon="el-icon-search" @click="handleQuery">查询</el-button>
</el-form-item> </el-form-item>
<el-form-item>
<el-button type="primary" size="small" icon="el-icon-search" @click="resetQuery">重置</el-button>
</el-form-item>
<div style="float: right"> <div style="float: right">
<el-form-item> <el-form-item>
<el-button <el-button
...@@ -70,13 +63,14 @@ ...@@ -70,13 +63,14 @@
</el-form-item> </el-form-item>
</div> </div>
</el-form> </el-form>
<div class="placeholder" />
<!-- TODO: 分隔符-->
<div class="placeholder" />
<transition name="fade-transform" mode="out-in"> <transition name="fade-transform" mode="out-in">
<component <component
:is="BaseTable" :is="BaseTable"
:key="queryParams.pageNum" :key="queryParams.rows"
:all-table-arguments="allTableArguments" :all-table-arguments="allTableArguments"
@handle-detail="handleDetail" @handle-detail="handleDetail"
@handle-update="handleUpdate" @handle-update="handleUpdate"
...@@ -199,21 +193,7 @@ export default { ...@@ -199,21 +193,7 @@ export default {
}, },
// 表格数据 // 表格数据
list: [], list: [],
// 状态数据字典
statusOptions: [
{
dictLabel: '启用',
dictValue: '1'
},
{
dictLabel: '停用',
dictValue: '0'
}
],
// 日期范围
dateRange: [],
selectValue: '',
selectOptions: [ selectOptions: [
{ {
value: '1', value: '1',
...@@ -227,10 +207,9 @@ export default { ...@@ -227,10 +207,9 @@ export default {
queryParams: { queryParams: {
page: 1, page: 1,
rows: 10, rows: 10,
ipaddr: undefined, pn: '',
username: undefined, updateBy: '',
status: undefined, selectValue: ''
loginTime: ''
}, },
// TODO: 用来说明每一列的类型 // TODO: 用来说明每一列的类型
...@@ -261,11 +240,16 @@ export default { ...@@ -261,11 +240,16 @@ export default {
} }
} }
}, },
{
text: true,
prop: 'pn',
label: '设备编码'
},
{ {
ownDefined: true, ownDefined: true,
prop: 'poperate', prop: 'poperate',
label: 'poperate', label: 'poperate',
width: '', width: '180px',
ownDefinedReturn: (row, $index) => { ownDefinedReturn: (row, $index) => {
switch (row.poperate) { switch (row.poperate) {
case '1': case '1':
...@@ -281,11 +265,6 @@ export default { ...@@ -281,11 +265,6 @@ export default {
} }
} }
}, },
{
text: true,
prop: 'pn',
label: 'pn'
},
{ {
time: true, time: true,
prop: 'updateDate', prop: 'updateDate',
...@@ -294,7 +273,7 @@ export default { ...@@ -294,7 +273,7 @@ export default {
}, },
{ {
text: true, text: true,
prop: 'createBy', prop: 'updateBy',
label: '操作人', label: '操作人',
sortable: false, sortable: false,
width: '210px' width: '210px'
...@@ -312,7 +291,9 @@ export default { ...@@ -312,7 +291,9 @@ export default {
icon: '', icon: '',
color: '', color: '',
size: this.size, size: this.size,
buttonClick: this.handleDetail, buttonClick: () => {
return 'this.handleDetail'
},
isShow: (row, $index) => { isShow: (row, $index) => {
return true return true
} }
...@@ -322,7 +303,9 @@ export default { ...@@ -322,7 +303,9 @@ export default {
icon: '', icon: '',
color: '', color: '',
size: this.size, size: this.size,
buttonClick: this.handleUpdate, buttonClick: () => {
return 'this.handleUpdate'
},
isShow: (row, $index) => { isShow: (row, $index) => {
return true return true
} }
...@@ -332,7 +315,9 @@ export default { ...@@ -332,7 +315,9 @@ export default {
icon: '', icon: '',
color: '', color: '',
size: this.size, size: this.size,
buttonClick: this.handleDelete, buttonClick: () => {
return 'this.handleDelete'
},
isShow: (row, $index) => { isShow: (row, $index) => {
return true return true
} }
...@@ -402,25 +387,15 @@ export default { ...@@ -402,25 +387,15 @@ export default {
/** 查询登录日志列表 */ /** 查询登录日志列表 */
getList() { getList() {
this.loading = true this.loading = true
// const query = Object.assign({}, this.queryParams) listLog(this.queryParams).then(response => {
// query.loginTime = query.loginTime ? this.$parseDate(new Date(query.loginTime), 'YYYY-MM-DD HH:mm:ss') : '' this.total = response.rows.length
// list(this.addDateRange(this.queryParams, this.dateRange)).then(response => { this.processList = response.rows
// this.list = response.rows
// this.total = response.total
// this.loading = false
// })
listLog().then(response => {
this.processList = response.data
this.loading = false this.loading = false
}) })
}, },
handleClose() { handleClose() {
this.clearVisible = false this.clearVisible = false
this.exportVisible = false this.exportVisible = false
},
timechange(e) {
}, },
// 登录状态字典翻译 // 登录状态字典翻译
// statusFormat(row, column) { // statusFormat(row, column) {
...@@ -433,7 +408,6 @@ export default { ...@@ -433,7 +408,6 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.dateRange = ''
this.resetForm('queryForm') this.resetForm('queryForm')
this.handleQuery() this.handleQuery()
}, },
...@@ -442,51 +416,6 @@ export default { ...@@ -442,51 +416,6 @@ export default {
this.ids = selection.map(item => item.businessId) this.ids = selection.map(item => item.businessId)
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 删除按钮操作 */
handleDelete(data) {
this.$confirm('是否确认操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// const id = this.ids.join(',')
const id = data
const query = {
deleteIds: id
}
return delLogininfo(query)
}).then(() => {
this.getList()
this.$message.success('删除成功')
this.ids = []
this.multiple = true
}).catch(function() {})
},
clear() {
this.$refs['clear'].validate((valid) => {
if (valid) {
const that = this
const query = {
beginTime: that.clearFrom.month[0],
endTime: that.clearFrom.month[1]
}
cleanLogininfo(query).then(res => {
if (res.code === 200) {
that.getList()
that.$message.success('清空成功')
this.clearVisible = false
} else {
that.$message.error(res.message)
}
})
}
})
},
/** 清空按钮操作 */
handleClean() {
this.clearVisible = true
this.clearFrom = {}
},
exportSubmit() { exportSubmit() {
this.$refs['export'].validate((valid) => { this.$refs['export'].validate((valid) => {
if (valid) { if (valid) {
...@@ -515,14 +444,6 @@ export default { ...@@ -515,14 +444,6 @@ export default {
handleExport() { handleExport() {
this.exportVisible = true this.exportVisible = true
this.exportFrom = {} this.exportFrom = {}
// const queryParams = Object.assign({}, this.queryParams)
// // queryParams.loginTime = queryParams.loginTime ? this.$parseDate(new Date(queryParams.loginTime), 'YYYY-MM-DD HH:mm:ss') : ''
// delete queryParams.page
// delete queryParams.rows
// queryParams.ids = this.ids.join(',') || null
// exportLogininfo(queryParams).then(response => {
// this.download(response.msg)
// }).catch(function() {})
} }
} }
} }
......
...@@ -435,40 +435,7 @@ export default { ...@@ -435,40 +435,7 @@ export default {
} }
}) })
}, },
/** TODO: 关于模拟数据的 删除list数组所调用的删除方法,封装的函数如下 */
delProcess(delProcessName) {
let tip = false
for (const pd0 of this.simulateProcessList) {
console.log('This is pd0:', pd0)
if (pd0.processName === delProcessName) {
this.simulateProcessList = this.simulateProcessList.filter(item => item.processName !== delProcessName)
tip = true
break
}
}
return tip
},
/** TODO:删除按钮操作 */
handleDelete(row, $index) {
this.$confirm('是否确认操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
return this.delProcess(row.processName)
}).then(() => {
this.getList()
this.$message({
message: '删除成功',
type: 'success'
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
}
} }
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -267,8 +267,8 @@ import { ...@@ -267,8 +267,8 @@ import {
listRole, listRole,
updateRole updateRole
} from '@/api/system/role' } from '@/api/system/role'
import { roleMenuTreeselect, roleMenuTreeselectMC, treeselect as menuTreeselect } from '@/api/system/menu' import {roleMenuTreeselect, roleMenuTreeselectMC, treeselect as menuTreeselect} from '@/api/system/menu'
import { roleDeptTreeselect, treeselect as deptTreeselect } from '@/api/system/dept' import {roleDeptTreeselect, treeselect as deptTreeselect} from '@/api/system/dept'
// import { getRolesByInsId } from '../../../api/businessManage/template' // import { getRolesByInsId } from '../../../api/businessManage/template'
export default { export default {
name: 'Role', name: 'Role',
...@@ -340,8 +340,8 @@ export default { ...@@ -340,8 +340,8 @@ export default {
tOptions: [], tOptions: [],
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, page: 1,
pageSize: 10, rows: 10,
roleName: undefined, roleName: undefined,
roleKey: undefined, roleKey: undefined,
flag: undefined flag: undefined
......
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