Merge pull request '对接后台,部分已完成' (#8) from zwq into master

Reviewed-on: #8
This commit is contained in:
朱文强 2021-12-08 14:54:54 +08:00
commit 2fda922944
32 changed files with 1556 additions and 877 deletions

View File

@ -1,8 +1,15 @@
/*
* @Author: zwq
* @Date: 2021-11-15 08:20:28
* @LastEditors: zwq
* @LastEditTime: 2021-12-06 15:34:11
* @Description:
*/
'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"',
OPEN_PROXY: false // 是否开启代理, 重置后需重启vue-cli
OPEN_PROXY: true // 是否开启代理, 重置后需重启vue-cli
})

View File

@ -1,3 +1,10 @@
/*
* @Author: zwq
* @Date: 2021-11-15 08:20:28
* @LastEditors: zwq
* @LastEditTime: 2021-12-07 14:48:25
* @Description:
*/
'use strict'
// Template version: 1.2.5
// see http://vuejs-templates.github.io/webpack for documentation.
@ -14,10 +21,10 @@ module.exports = {
// 代理列表, 是否开启代理通过[./dev.env.js]配置
proxyTable: devEnv.OPEN_PROXY === false ? {} : {
'/proxyApi': {
target: 'http://demo.renren.io/renren-fast/',
target: 'http://192.168.0.134:8080/',
changeOrigin: true,
pathRewrite: {
'^/proxyApi': '/'
'^/proxyApi': '/api'
}
}
},

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-15 08:20:28
* @LastEditors: zwq
* @LastEditTime: 2021-11-15 17:17:47
* @LastEditTime: 2021-12-06 15:15:08
* @Description:
*/
import Mock from 'mockjs'
@ -18,14 +18,14 @@ import * as sysUser from './modules/sys-user'
// tips
// 1. 开启/关闭[业务模块]拦截, 通过调用fnCreate方法[isOpen参数]设置.
// 2. 开启/关闭[业务模块中某个请求]拦截, 通过函数返回对象中的[isOpen属性]设置.
fnCreate(common, true)
fnCreate(jobSchedule, true)
fnCreate(oss, true)
fnCreate(sysConfig, true)
fnCreate(sysLog, true)
fnCreate(sysMenu, true)
fnCreate(sysRole, true)
fnCreate(sysUser, true)
fnCreate(common, false)
fnCreate(jobSchedule, false)
fnCreate(oss, false)
fnCreate(sysConfig, false)
fnCreate(sysLog, false)
fnCreate(sysMenu, false)
fnCreate(sysRole, false)
fnCreate(sysUser, false)
/**
* 创建mock模拟数据

View File

@ -1,3 +1,10 @@
/*
* @Author: zwq
* @Date: 2021-11-15 08:20:28
* @LastEditors: zwq
* @LastEditTime: 2021-12-08 14:18:09
* @Description:
*/
/**
* 全站路由配置
*
@ -6,8 +13,6 @@
*/
import Vue from 'vue'
import Router from 'vue-router'
import http from '@/utils/httpRequest'
import { isURL } from '@/utils/validate'
import { clearLoginInfo } from '@/utils'
Vue.use(Router)
@ -41,6 +46,7 @@ const mainRoutes = {
{ path: '/demo-echarts', component: _import('demo/echarts'), name: 'demo-echarts', meta: { title: 'demo-echarts', isTab: true } },
{ path: '/demo-ueditor', component: _import('demo/ueditor'), name: 'demo-ueditor', meta: { title: 'demo-ueditor', isTab: true } },
{ path: '/basic-cache', component: _import('basic/cache'), name: 'basic-cache', meta: { title: '缓存区信息' } },
{ path: '/basic-processInfo', component: _import('basic/processInfo'), name: 'basic-processInfo', meta: { title: '工艺信息' } },
{ path: '/basic-cache-location', component: _import('basic/components/location'), name: 'basic-cache-location', meta: { title: '库位信息' } },
{ path: '/basic-equipmentInfo', component: _import('basic/equipmentInfo'), name: 'basic-equipmentInfo', meta: { title: '设备基础信息' } },
{ path: '/basic-carInfo', component: _import('basic/carInfo'), name: 'basic-carInfo', meta: { title: '车辆信息' } },
@ -79,108 +85,6 @@ const mainRoutes = {
const router = new Router({
mode: 'hash',
scrollBehavior: () => ({ y: 0 }),
isAddDynamicMenuRoutes: false, // 是否已经添加动态(菜单)路由
routes: globalRoutes.concat(mainRoutes)
})
router.beforeEach((to, from, next) => {
// 添加动态(菜单)路由
// 1. 已经添加 or 全局路由, 直接访问
// 2. 获取菜单列表, 添加并保存本地存储
if (router.options.isAddDynamicMenuRoutes || fnCurrentRouteType(to, globalRoutes) === 'global') {
next()
} else {
http({
url: http.adornUrl('/sys/menu/nav'),
method: 'get',
params: http.adornParams()
}).then(({data}) => {
if (data && data.code === 0) {
fnAddDynamicMenuRoutes(data.menuList)
router.options.isAddDynamicMenuRoutes = true
sessionStorage.setItem('menuList', JSON.stringify(data.menuList || '[]'))
sessionStorage.setItem('permissions', JSON.stringify(data.permissions || '[]'))
next({ ...to, replace: true })
} else {
sessionStorage.setItem('menuList', '[]')
sessionStorage.setItem('permissions', '[]')
next()
}
}).catch((e) => {
console.log(`%c${e} 请求菜单列表和权限失败,跳转至登录页!!`, 'color:blue')
router.push({ name: 'login' })
})
}
})
/**
* 判断当前路由类型, global: 全局路由, main: 主入口路由
* @param {*} route 当前路由
*/
function fnCurrentRouteType (route, globalRoutes = []) {
var temp = []
for (var i = 0; i < globalRoutes.length; i++) {
if (route.path === globalRoutes[i].path) {
return 'global'
} else if (globalRoutes[i].children && globalRoutes[i].children.length >= 1) {
temp = temp.concat(globalRoutes[i].children)
}
}
return temp.length >= 1 ? fnCurrentRouteType(route, temp) : 'main'
}
/**
* 添加动态(菜单)路由
* @param {*} menuList 菜单列表
* @param {*} routes 递归创建的动态(菜单)路由
*/
function fnAddDynamicMenuRoutes (menuList = [], routes = []) {
var temp = []
for (var i = 0; i < menuList.length; i++) {
if (menuList[i].list && menuList[i].list.length >= 1) {
temp = temp.concat(menuList[i].list)
} else if (menuList[i].url && /\S/.test(menuList[i].url)) {
menuList[i].url = menuList[i].url.replace(/^\//, '')
var route = {
path: menuList[i].url.replace('/', '-'),
component: null,
name: menuList[i].url.replace('/', '-'),
meta: {
menuId: menuList[i].menuId,
title: menuList[i].name,
isDynamic: true,
isTab: true,
iframeUrl: ''
}
}
// url以http[s]://开头, 通过iframe展示
if (isURL(menuList[i].url)) {
route['path'] = `i-${menuList[i].menuId}`
route['name'] = `i-${menuList[i].menuId}`
route['meta']['iframeUrl'] = menuList[i].url
} else {
try {
route['component'] = _import(`modules/${menuList[i].url}`) || null
} catch (e) {}
}
routes.push(route)
}
}
if (temp.length >= 1) {
fnAddDynamicMenuRoutes(temp, routes)
} else {
mainRoutes.name = 'main-dynamic'
mainRoutes.children = routes
router.addRoutes([
mainRoutes,
{ path: '*', redirect: { name: '404' } }
])
sessionStorage.setItem('dynamicMenuRoutes', JSON.stringify(mainRoutes.children || '[]'))
console.log('\n')
console.log('%c!<-------------------- 动态(菜单)路由 s -------------------->', 'color:blue')
console.log(mainRoutes.children)
console.log('%c!<-------------------- 动态(菜单)路由 e -------------------->', 'color:blue')
}
}
export default router

View File

@ -4,10 +4,10 @@
<el-form-item>
<el-select v-model="dataForm.paramKey" filterable placeholder="报警编码">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in dataList"
:key="item.id"
:label="item.code"
:value="item.code"
>
</el-option>
</el-select>
@ -30,25 +30,25 @@
width="50">
</el-table-column>
<el-table-column
prop="paramKey"
prop="createTime"
header-align="center"
align="center"
label="添加时间">
</el-table-column>
<el-table-column
prop="paramValue"
prop="alarmClass"
header-align="center"
align="center"
label="报警类型">
</el-table-column>
<el-table-column
prop="remark"
prop="code"
header-align="center"
align="center"
label="报警编码">
</el-table-column>
<el-table-column
prop="remark"
prop="alarmInfo"
header-align="center"
align="center"
label="报警内容">
@ -61,7 +61,7 @@
label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
<el-button type="text" style="color:red" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
</template>
</el-table-column>
</el-table>
@ -88,7 +88,6 @@
paramKey: ''
},
dataList: [],
options: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
@ -107,17 +106,17 @@
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/sys/config/list'),
method: 'get',
params: this.$http.adornParams({
'page': this.pageIndex,
'limit': this.pageSize,
'paramKey': this.dataForm.paramKey
url: this.$http.adornUrl('alarmBase/page'),
method: 'post',
data: this.$http.adornData({
'current': this.pageIndex,
'size': this.pageSize,
'alarmClass': this.dataForm.paramKey
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
this.dataList = data.data.records
this.totalPage = data.data.total
} else {
this.dataList = []
this.totalPage = 0
@ -151,9 +150,9 @@
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/sys/config/delete'),
url: this.$http.adornUrl('alarmBase/delete'),
method: 'post',
data: this.$http.adornData(id, false)
data: this.$http.adornData({id})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({

View File

@ -22,19 +22,19 @@
width="50">
</el-table-column>
<el-table-column
prop="paramKey"
prop="createTime"
header-align="center"
align="center"
label="添加时间">
</el-table-column>
<el-table-column
prop="paramValue"
prop="warehouseName"
header-align="center"
align="center"
label="缓存区名称">
</el-table-column>
<el-table-column
prop="remark"
prop="code"
header-align="center"
align="center"
label="编码">
@ -114,17 +114,17 @@
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/sys/config/list'),
method: 'get',
params: this.$http.adornParams({
'page': this.pageIndex,
'limit': this.pageSize,
'paramKey': this.dataForm.paramKey
url: this.$http.adornUrl('warehouse/page'),
method: 'post',
data: this.$http.adornData({
'current': this.pageIndex,
'size': this.pageSize,
'code': this.dataForm.paramKey
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
this.dataList = data.data.records
this.totalPage = data.data.total
} else {
this.dataList = []
this.totalPage = 0
@ -161,9 +161,9 @@
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/sys/config/delete'),
url: this.$http.adornUrl('warehouse/delete'),
method: 'post',
data: this.$http.adornData(id, false)
data: this.$http.adornData({id})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({

View File

@ -4,10 +4,10 @@
<el-form-item>
<el-select v-model="dataForm.paramKey" filterable placeholder="名称">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
v-for="item in dataList"
:key="item.id"
:label="item.vehicleName"
:value="item.vehicleName"
>
</el-option>
</el-select>
@ -30,25 +30,25 @@
width="50">
</el-table-column>
<el-table-column
prop="paramKey"
prop="createTime"
header-align="center"
align="center"
label="添加时间">
</el-table-column>
<el-table-column
prop="paramValue"
prop="vehicleName"
header-align="center"
align="center"
label="车辆名称">
</el-table-column>
<el-table-column
prop="remark"
prop="code"
header-align="center"
align="center"
label="编码">
</el-table-column>
<el-table-column
prop="suoxie"
prop="vehicleAlias"
header-align="center"
align="center"
label="缩写">
@ -88,7 +88,6 @@
paramKey: ''
},
dataList: [],
options: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
@ -107,17 +106,17 @@
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/sys/config/list'),
method: 'get',
params: this.$http.adornParams({
'page': this.pageIndex,
'limit': this.pageSize,
'paramKey': this.dataForm.paramKey
url: this.$http.adornUrl('vehicle/page'),
method: 'post',
data: this.$http.adornData({
'current': this.pageIndex,
'size': this.pageSize,
'vehicleName': this.dataForm.paramKey
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
this.dataList = data.data.records
this.totalPage = data.data.total
} else {
this.dataList = []
this.totalPage = 0
@ -151,9 +150,9 @@
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/sys/config/delete'),
url: this.$http.adornUrl('vehicle/delete'),
method: 'post',
data: this.$http.adornData(id, false)
data: this.$http.adornData({id})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({

View File

@ -1,17 +1,24 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2021-12-08 11:15:12
* @Description:
-->
<template>
<el-dialog
:title="!dataForm.id ? '新增' : '修改'"
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form-item label="参数名" prop="paramKey">
<el-input v-model="dataForm.paramKey" placeholder="参数名"></el-input>
<el-form-item label="报警编码" prop="code">
<el-input v-model="dataForm.code" placeholder="报警编码"></el-input>
</el-form-item>
<el-form-item label="参数值" prop="paramValue">
<el-input v-model="dataForm.paramValue" placeholder="参数值"></el-input>
<el-form-item label="报警类型" prop="alarmClass">
<el-input v-model="dataForm.alarmClass" placeholder="报警类型"></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
<el-form-item label="报警内容" prop="alarmInfo">
<el-input v-model="dataForm.alarmInfo" placeholder="报警内容"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@ -27,39 +34,45 @@
return {
visible: false,
dataForm: {
id: 0,
paramKey: '',
paramValue: '',
remark: ''
id: '',
code: '',
alarmClass: '',
alarmInfo: ''
},
dataRule: {
paramKey: [
{ required: true, message: '参数名不能为空', trigger: 'blur' }
code: [
{ required: true, message: '报警编码不能为空', trigger: 'blur' }
],
paramValue: [
{ required: true, message: '参数值不能为空', trigger: 'blur' }
alarmInfo: [
{ required: true, message: '报警内容不能为空', trigger: 'blur' }
]
}
}
},
methods: {
init (id) {
this.dataForm.id = id || 0
this.dataForm.id = id || ''
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.$http({
url: this.$http.adornUrl(`/sys/config/info/${this.dataForm.id}`),
method: 'get',
params: this.$http.adornParams()
url: this.$http.adornUrl(`alarmBase/get`),
method: 'post',
data: this.$http.adornData({id})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm.paramKey = data.config.paramKey
this.dataForm.paramValue = data.config.paramValue
this.dataForm.remark = data.config.remark
this.dataForm = data.data
}
})
} else {
this.$http({
url: this.$http.adornUrl(`alarmBase/codeGenerator`),
method: 'post',
data: this.$http.adornData()
}).then((data) => {
this.dataForm.code = data.data
})
}
})
},
@ -68,13 +81,13 @@
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.$http({
url: this.$http.adornUrl(`/sys/config/${!this.dataForm.id ? 'save' : 'update'}`),
url: this.$http.adornUrl(`alarmBase/${!this.dataForm.id ? 'add' : 'update'}`),
method: 'post',
data: this.$http.adornData({
'id': this.dataForm.id || undefined,
'paramKey': this.dataForm.paramKey,
'paramValue': this.dataForm.paramValue,
'remark': this.dataForm.remark
'code': this.dataForm.code,
'alarmClass': this.dataForm.alarmClass,
'alarmInfo': this.dataForm.alarmInfo
})
}).then(({data}) => {
if (data && data.code === 0) {

View File

@ -1,17 +1,65 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2021-12-08 14:03:15
* @Description:
-->
<template>
<el-dialog
:title="!dataForm.id ? '新增' : '修改'"
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form-item label="参数名" prop="paramKey">
<el-input v-model="dataForm.paramKey" placeholder="参数名"></el-input>
:visible.sync="visible"
>
<el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="80px"
>
<el-form-item label="缓存区编码" prop="code">
<el-input v-model="dataForm.code" placeholder="缓存区编码"></el-input>
</el-form-item>
<el-form-item label="参数值" prop="paramValue">
<el-input v-model="dataForm.paramValue" placeholder="参数值"></el-input>
<el-form-item label="缓存区名称" prop="warehouseName">
<el-input
v-model="dataForm.warehouseName"
placeholder="缓存区名称"
></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
<el-form-item label="英文名称" prop="alarmInfo">
<el-input
v-model="dataForm.alarmInfo"
placeholder="英文名称"
></el-input>
</el-form-item>
<el-form-item label="缩写" prop="alarmInfo">
<el-input v-model="dataForm.alarmInfo" placeholder="缩写"></el-input>
</el-form-item>
<el-form-item label="规格描述" prop="spec">
<el-input
v-model="dataForm.spec"
placeholder="规格描述"
></el-input>
</el-form-item>
<el-form-item label="库位数量" prop="alarmInfo">
<el-input
v-model="dataForm.alarmInfo"
placeholder="库位数量"
></el-input>
</el-form-item>
<el-form-item label="当前状态" prop="alarmInfo"
><el-switch
v-model="dataForm.alarmInfo"
active-color="#13ce66"
inactive-color="#ff4949"
active-value="1"
inactive-value="0"
>
</el-switch>
</el-form-item>
<el-form-item label="备注" prop="description">
<el-input v-model="dataForm.description" placeholder="备注"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@ -22,78 +70,82 @@
</template>
<script>
export default {
data () {
return {
visible: false,
dataForm: {
id: 0,
paramKey: '',
paramValue: '',
remark: ''
},
dataRule: {
paramKey: [
{ required: true, message: '参数名不能为空', trigger: 'blur' }
],
paramValue: [
{ required: true, message: '参数值不能为空', trigger: 'blur' }
]
}
}
},
methods: {
init (id) {
this.dataForm.id = id || 0
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.$http({
url: this.$http.adornUrl(`/sys/config/info/${this.dataForm.id}`),
method: 'get',
params: this.$http.adornParams()
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm.paramKey = data.config.paramKey
this.dataForm.paramValue = data.config.paramValue
this.dataForm.remark = data.config.remark
}
})
}
})
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
code: '',
description: '',
spec: '',
warehouseName: ''
},
//
dataFormSubmit () {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.$http({
url: this.$http.adornUrl(`/sys/config/${!this.dataForm.id ? 'save' : 'update'}`),
method: 'post',
data: this.$http.adornData({
'id': this.dataForm.id || undefined,
'paramKey': this.dataForm.paramKey,
'paramValue': this.dataForm.paramValue,
'remark': this.dataForm.remark
})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
} else {
this.$message.error(data.msg)
}
})
}
})
dataRule: {
}
}
},
methods: {
init (id) {
this.dataForm.id = id || ''
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.$http({
url: this.$http.adornUrl(`warehouse/get`),
method: 'post',
data: this.$http.adornData({ id })
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataForm = data.data
}
})
} else {
this.$http({
url: this.$http.adornUrl(`warehouse/codeGenerator`),
method: 'post',
data: this.$http.adornData()
}).then(data => {
this.dataForm.code = data.data
})
}
})
},
//
dataFormSubmit () {
this.$refs['dataForm'].validate(valid => {
if (valid) {
this.$http({
url: this.$http.adornUrl(
`warehouse/${!this.dataForm.id ? 'add' : 'update'}`
),
method: 'post',
data: this.$http.adornData({
id: this.dataForm.id || undefined,
code: this.dataForm.code,
description: this.dataForm.description,
warehouseName: this.dataForm.warehouseName,
spec: this.dataForm.spec
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
} else {
this.$message.error(data.msg)
}
})
}
})
}
}
}
</script>

View File

@ -1,17 +1,27 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2021-12-08 11:22:54
* @Description:
-->
<template>
<el-dialog
:title="!dataForm.id ? '新增' : '修改'"
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form-item label="参数名" prop="paramKey">
<el-input v-model="dataForm.paramKey" placeholder="参数名"></el-input>
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form-item label="车辆编码" prop="code">
<el-input v-model="dataForm.code" placeholder="车辆编码"></el-input>
</el-form-item>
<el-form-item label="参数值" prop="paramValue">
<el-input v-model="dataForm.paramValue" placeholder="参数值"></el-input>
<el-form-item label="车辆名称" prop="vehicleName">
<el-input v-model="dataForm.vehicleName" placeholder="车辆名称"></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
<el-form-item label="缩写" prop="vehicleAlias">
<el-input v-model="dataForm.vehicleAlias" placeholder="缩写"></el-input>
</el-form-item>
<el-form-item label="IP地址" prop="ip">
<el-input v-model="dataForm.ip" placeholder="IP地址"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@ -27,39 +37,38 @@
return {
visible: false,
dataForm: {
id: 0,
paramKey: '',
paramValue: '',
remark: ''
},
dataRule: {
paramKey: [
{ required: true, message: '参数名不能为空', trigger: 'blur' }
],
paramValue: [
{ required: true, message: '参数值不能为空', trigger: 'blur' }
]
id: '',
code: '',
ip: '',
vehicleName: '',
vehicleAlias: ''
}
}
},
methods: {
init (id) {
this.dataForm.id = id || 0
this.dataForm.id = id || ''
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.$http({
url: this.$http.adornUrl(`/sys/config/info/${this.dataForm.id}`),
method: 'get',
params: this.$http.adornParams()
url: this.$http.adornUrl(`vehicle/get`),
method: 'post',
data: this.$http.adornData({id})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm.paramKey = data.config.paramKey
this.dataForm.paramValue = data.config.paramValue
this.dataForm.remark = data.config.remark
this.dataForm = data.data
}
})
} else {
this.$http({
url: this.$http.adornUrl(`vehicle/codeGenerator`),
method: 'post',
data: this.$http.adornData()
}).then((data) => {
this.dataForm.code = data.data
})
}
})
},
@ -68,13 +77,14 @@
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.$http({
url: this.$http.adornUrl(`/sys/config/${!this.dataForm.id ? 'save' : 'update'}`),
url: this.$http.adornUrl(`vehicle/${!this.dataForm.id ? 'add' : 'update'}`),
method: 'post',
data: this.$http.adornData({
'id': this.dataForm.id || undefined,
'paramKey': this.dataForm.paramKey,
'paramValue': this.dataForm.paramValue,
'remark': this.dataForm.remark
'code': this.dataForm.code,
'vehicleName': this.dataForm.vehicleName,
'ip': this.dataForm.ip,
'vehicleAlias': this.dataForm.vehicleAlias
})
}).then(({data}) => {
if (data && data.code === 0) {

View File

@ -1,17 +1,37 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2021-12-08 14:11:44
* @Description:
-->
<template>
<el-dialog
:title="!dataForm.id ? '新增' : '修改'"
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form-item label="参数名" prop="paramKey">
<el-input v-model="dataForm.paramKey" placeholder="参数名"></el-input>
<el-form-item label="库位名称" prop="locationName">
<el-input v-model="dataForm.locationName" placeholder="库位名称"></el-input>
</el-form-item>
<el-form-item label="参数值" prop="paramValue">
<el-input v-model="dataForm.paramValue" placeholder="参数值"></el-input>
<el-form-item label="库位编码" prop="code">
<el-input v-model="dataForm.code" placeholder="库位编码"></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
<el-form-item label="当前状态" prop="alarmInfo"
><el-switch
v-model="dataForm.alarmInfo"
active-color="#13ce66"
inactive-color="#ff4949"
active-value="1"
inactive-value="0"
>
</el-switch>
</el-form-item>
<el-form-item label="库位别名" prop="locationNameAlias">
<el-input v-model="dataForm.locationNameAlias" placeholder="库位别名"></el-input>
</el-form-item>
<el-form-item label="英文名称" prop="alarmInfo">
<el-input v-model="dataForm.alarmInfo" placeholder="英文名称"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
@ -27,39 +47,44 @@
return {
visible: false,
dataForm: {
id: 0,
paramKey: '',
paramValue: '',
remark: ''
id: '',
code: '',
locationName: '',
locationNameAlias: '',
warehouseId: ''
},
dataRule: {
paramKey: [
{ required: true, message: '参数名不能为空', trigger: 'blur' }
],
paramValue: [
{ required: true, message: '参数值不能为空', trigger: 'blur' }
code: [
{ required: true, message: '编码不能为空', trigger: 'blur' }
]
}
}
},
methods: {
init (id) {
this.dataForm.id = id || 0
init (id, warehouseId) {
this.dataForm.id = id || ''
this.dataForm.warehouseId = warehouseId
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.$http({
url: this.$http.adornUrl(`/sys/config/info/${this.dataForm.id}`),
method: 'get',
params: this.$http.adornParams()
url: this.$http.adornUrl(`locationInfo/get`),
method: 'post',
data: this.$http.adornData({id})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm.paramKey = data.config.paramKey
this.dataForm.paramValue = data.config.paramValue
this.dataForm.remark = data.config.remark
this.dataForm = data.data
}
})
} else {
this.$http({
url: this.$http.adornUrl(`locationInfo/codeGenerator`),
method: 'post',
data: this.$http.adornData()
}).then((data) => {
this.dataForm.code = data.data
})
}
})
},
@ -68,13 +93,14 @@
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.$http({
url: this.$http.adornUrl(`/sys/config/${!this.dataForm.id ? 'save' : 'update'}`),
url: this.$http.adornUrl(`locationInfo/${!this.dataForm.id ? 'add' : 'update'}`),
method: 'post',
data: this.$http.adornData({
'id': this.dataForm.id || undefined,
'paramKey': this.dataForm.paramKey,
'paramValue': this.dataForm.paramValue,
'remark': this.dataForm.remark
'code': this.dataForm.code,
'locationName': this.dataForm.locationName,
'warehouseId': this.dataForm.warehouseId,
'locationNameAlias': this.dataForm.locationNameAlias
})
}).then(({data}) => {
if (data && data.code === 0) {

View File

@ -19,25 +19,25 @@
width="50">
</el-table-column>
<el-table-column
prop="paramKey"
prop="createTime"
header-align="center"
align="center"
label="添加时间">
</el-table-column>
<el-table-column
prop="paramValue"
prop="locationName"
header-align="center"
align="center"
label="库位名称">
</el-table-column>
<el-table-column
prop="remark"
prop="code"
header-align="center"
align="center"
label="编码">
</el-table-column>
<el-table-column
prop="rname"
prop="locationNameAlias"
header-align="center"
align="center"
label="别名">
@ -53,6 +53,9 @@
header-align="center"
align="center"
label="状态">
<template slot-scope="scope">
<span>{{scope.row.status === 0?'空闲':scope.row.status === 1?'使用中':'不可使用'}}</span>
</template>
</el-table-column>
<el-table-column
fixed="right"
@ -85,6 +88,7 @@
export default {
data () {
return {
warehouseId: '',
dataList: [],
pageIndex: 1,
pageSize: 10,
@ -101,22 +105,24 @@
},
created () {
console.log(this.$route.query.id)
this.warehouseId = this.$route.query.id
},
methods: {
//
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/sys/config/list'),
method: 'get',
params: this.$http.adornParams({
'page': this.pageIndex,
'limit': this.pageSize
url: this.$http.adornUrl('locationInfo/page'),
method: 'post',
data: this.$http.adornData({
'current': this.pageIndex,
'size': this.pageSize,
'warehouseId': this.warehouseId
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
this.dataList = data.data.records
this.totalPage = data.data.total
} else {
this.dataList = []
this.totalPage = 0
@ -139,9 +145,12 @@
addOrUpdateHandle (id) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id)
this.$refs.addOrUpdate.init(id, this.warehouseId)
})
},
LocationBtn (id) {
this.$router.push({name: 'basic-cache-location', query: {id}})
},
//
deleteHandle (id) {
this.$confirm(`确定对[id=${id}]进行删除操作?`, '提示', {
@ -150,9 +159,9 @@
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/sys/config/delete'),
url: this.$http.adornUrl('locationInfo/delete'),
method: 'post',
data: this.$http.adornData(id, false)
data: this.$http.adornData({id})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({

View File

@ -0,0 +1,126 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2021-12-08 14:21:48
* @Description:
-->
<template>
<el-dialog
:title="!dataForm.id ? '新增' : '修改'"
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="100px">
<el-form-item label="工艺编码" prop="code">
<el-input v-model="dataForm.code" placeholder="工艺编码"></el-input>
</el-form-item>
<el-form-item label="工艺号" prop="alarmClass">
<el-input v-model="dataForm.alarmClass" placeholder="工艺号"></el-input>
</el-form-item>
<el-form-item label="对应PLC值" prop="alarmInfo">
<el-input v-model="dataForm.alarmInfo" placeholder="对应PLC值"></el-input>
</el-form-item>
<el-form-item label="当前状态" prop="alarmInfo"
><el-switch
v-model="dataForm.alarmInfo"
active-color="#13ce66"
inactive-color="#ff4949"
active-value="1"
inactive-value="0"
>
</el-switch>
</el-form-item>
<el-form-item label="说明" prop="remark">
<el-input v-model="dataForm.remark" placeholder="说明"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
data () {
return {
visible: false,
dataForm: {
id: '',
code: '',
alarmClass: '',
alarmInfo: '',
remark: ''
},
dataRule: {
code: [
{ required: true, message: '工艺编码不能为空', trigger: 'blur' }
],
alarmInfo: [
{ required: true, message: '对应PLC值不能为空', trigger: 'blur' }
]
}
}
},
methods: {
init (id) {
this.dataForm.id = id || ''
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.$http({
url: this.$http.adornUrl(`alarmBase/get`),
method: 'post',
data: this.$http.adornData({id})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm = data.data
}
})
} else {
this.$http({
url: this.$http.adornUrl(`alarmBase/codeGenerator`),
method: 'post',
data: this.$http.adornData()
}).then((data) => {
this.dataForm.code = data.data
})
}
})
},
//
dataFormSubmit () {
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.$http({
url: this.$http.adornUrl(`alarmBase/${!this.dataForm.id ? 'add' : 'update'}`),
method: 'post',
data: this.$http.adornData({
'id': this.dataForm.id || undefined,
'code': this.dataForm.code,
'alarmClass': this.dataForm.alarmClass,
'alarmInfo': this.dataForm.alarmInfo
})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
} else {
this.$message.error(data.msg)
}
})
}
})
}
}
}
</script>

View File

@ -0,0 +1,186 @@
<template>
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-select v-model="dataForm.paramKey" filterable placeholder="工艺号">
<el-option
v-for="item in dataList"
:key="item.id"
:label="item.code"
:value="item.code"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">查询</el-button>
<el-button type="primary" @click="addOrUpdateHandle()">新增</el-button>
</el-form-item>
</el-form>
<el-table
:data="dataList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
type="index"
header-align="center"
align="center"
label="序号"
width="50">
</el-table-column>
<el-table-column
prop="createTime"
header-align="center"
align="center"
label="添加时间">
</el-table-column>
<el-table-column
prop="alarmClass"
header-align="center"
align="center"
label="工艺号">
</el-table-column>
<el-table-column
prop="code"
header-align="center"
align="center"
label="工艺编码">
</el-table-column>
<el-table-column
prop="alarmInfo"
header-align="center"
align="center"
label="对应PLC值">
</el-table-column>
<el-table-column
prop="alarmInfo"
header-align="center"
align="center"
label="状态">
</el-table-column>
<el-table-column
prop="alarmInfo"
header-align="center"
align="center"
label="说明">
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="150"
label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>
<el-button type="text" style="color:red" size="small" @click="deleteHandle(scope.row.id)">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@current-change="currentChangeHandle"
:current-page="pageIndex"
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</div>
</template>
<script>
import AddOrUpdate from './components/processInfo-add'
export default {
data () {
return {
dataForm: {
paramKey: ''
},
dataList: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false,
addOrUpdateVisible: false
}
},
components: {
AddOrUpdate
},
activated () {
this.getDataList()
},
methods: {
//
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('alarmBase/page'),
method: 'post',
data: this.$http.adornData({
'current': this.pageIndex,
'size': this.pageSize,
'alarmClass': this.dataForm.paramKey
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.data.records
this.totalPage = data.data.total
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
// /
addOrUpdateHandle (id) {
this.addOrUpdateVisible = true
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id)
})
},
//
deleteHandle (id) {
this.$confirm(`确定对[id=${id}]进行删除操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('alarmBase/delete'),
method: 'post',
data: this.$http.adornData({id})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList()
}
})
} else {
this.$message.error(data.msg)
}
})
}).catch(() => {})
}
}
}
</script>

View File

@ -25,7 +25,7 @@
<el-table
:data="dataList"
border
height="600px"
height="500px"
v-loading="dataListLoading"
style="width: 100%"
>
@ -37,70 +37,96 @@
width="50"
></el-table-column>
<el-table-column
prop="id"
prop="taskCode"
header-align="center"
align="center"
label="任务编号"
>
</el-table-column>
<el-table-column
prop="username"
prop="idens"
header-align="center"
align="center"
label="标识卡"
>
<template slot-scope="scope">
<span>{{
scope.row.idens.join("|")
}}</span>
</template>
</el-table-column>
<el-table-column
prop="operation"
prop="materials"
header-align="center"
align="center"
label="物料名"
>
<template slot-scope="scope">
<span>{{
scope.row.materials.join("|")
}}</span>
</template>
</el-table-column>
<el-table-column
prop="method"
prop="customers"
header-align="center"
align="center"
label="客户"
>
<template slot-scope="scope">
<span>{{
scope.row.customers.join("|")
}}</span>
</template>
</el-table-column>
<el-table-column
prop="params11"
prop="kilnName"
header-align="center"
align="center"
label="窑炉"
>
</el-table-column>
<el-table-column
prop="time"
prop="status"
header-align="center"
align="center"
label="当前状态"
>
</el-table-column>
<el-table-column
prop="ip"
prop="taskType"
header-align="center"
align="center"
label="任务类型"
>
<template slot-scope="scope">
<span>{{
scope.row.taskType === 0
? "缓存到窑炉加工"
: scope.row.taskType === 1
? "出炉到缓存"
: scope.row.taskType === 2
? "缓存出库"
: "入库缓存"
}}</span>
</template>
</el-table-column>
<el-table-column
prop="createDate"
prop="startPosition"
header-align="center"
align="center"
label="开始位置"
>
</el-table-column>
<el-table-column
prop="createDate"
prop="targetPosition"
header-align="center"
align="center"
label="目标位置"
>
</el-table-column>
<el-table-column
prop="createDate"
prop="locationName"
header-align="center"
align="center"
label="库位"
@ -117,7 +143,7 @@ export default {
return {
dataList: [],
pageIndex: 1,
pageSize: 10,
pageSize: 500,
dataListLoading: false
}
},
@ -129,15 +155,15 @@ export default {
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/sys/log/list'),
method: 'get',
params: this.$http.adornParams({
page: this.pageIndex,
limit: this.pageSize
url: this.$http.adornUrl('currTask/mainCurrentTaskNow'),
method: 'post',
data: this.$http.adornData({
current: this.pageIndex,
size: this.pageSize
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.dataList = data.data.records
} else {
this.dataList = []
}

View File

@ -9,23 +9,12 @@
<div class="login-main">
<h3 class="login-title">管理员登录</h3>
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" status-icon>
<el-form-item prop="userName">
<el-input v-model="dataForm.userName" placeholder="帐号"></el-input>
<el-form-item prop="mobile">
<el-input v-model="dataForm.mobile" placeholder="帐号"></el-input>
</el-form-item>
<el-form-item prop="password">
<el-input v-model="dataForm.password" type="password" placeholder="密码"></el-input>
</el-form-item>
<el-form-item prop="captcha">
<el-row :gutter="20">
<el-col :span="14">
<el-input v-model="dataForm.captcha" placeholder="验证码">
</el-input>
</el-col>
<el-col :span="10" class="login-captcha">
<img :src="captchaPath" @click="getCaptcha()" alt="">
</el-col>
</el-row>
</el-form-item>
<el-form-item>
<el-button class="login-btn-submit" type="primary" @click="dataFormSubmit()">登录</el-button>
</el-form-item>
@ -37,32 +26,25 @@
</template>
<script>
import { getUUID } from '@/utils'
export default {
data () {
return {
dataForm: {
userName: '',
password: '',
uuid: '',
captcha: ''
mobile: '',
password: ''
},
dataRule: {
userName: [
mobile: [
{ required: true, message: '帐号不能为空', trigger: 'blur' }
],
password: [
{ required: true, message: '密码不能为空', trigger: 'blur' }
],
captcha: [
{ required: true, message: '验证码不能为空', trigger: 'blur' }
]
},
captchaPath: ''
}
},
created () {
this.getCaptcha()
},
methods: {
//
@ -70,17 +52,18 @@
this.$refs['dataForm'].validate((valid) => {
if (valid) {
this.$http({
url: this.$http.adornUrl('/sys/login'),
url: this.$http.adornUrl('passport/login'),
method: 'post',
data: this.$http.adornData({
'username': this.dataForm.userName,
'mobile': this.dataForm.mobile,
'password': this.dataForm.password,
'uuid': this.dataForm.uuid,
'captcha': this.dataForm.captcha
'appType': 1,
'userType': 1,
'openId': 13588441519
})
}).then(({data}) => {
if (data && data.code === 0) {
this.$cookie.set('token', data.token)
this.$cookie.set('token', data.data.token)
this.$router.replace({ name: 'home' })
} else {
this.getCaptcha()
@ -89,11 +72,6 @@
})
}
})
},
//
getCaptcha () {
this.dataForm.uuid = getUUID()
this.captchaPath = this.$http.adornUrl(`/captcha.jpg?uuid=${this.dataForm.uuid}`)
}
}
}

View File

@ -1,5 +1,6 @@
<template>
<div class="mod-config">
<div style="color:#67c23a;background:#f0f9eb;padding:5px;margin-bottom:5px;text-align:center">录入托盘标识卡信息</div>
<el-form :inline="true">
<el-form-item>
<el-button type="primary" @click="addOrUpdateHandle()">新增</el-button>

View File

@ -75,6 +75,13 @@
<icon-svg name="log" class="site-sidebar__menu-icon"></icon-svg>
<span slot="title">缓存区信息</span>
</el-menu-item>
<el-menu-item
index="processInfo"
@click="$router.push({ name: 'basic-processInfo' })"
>
<icon-svg name="log" class="site-sidebar__menu-icon"></icon-svg>
<span slot="title">工艺信息</span>
</el-menu-item>
<el-menu-item
index="equipmentInfo"
@click="$router.push({ name: 'basic-equipmentInfo' })"
@ -281,20 +288,20 @@
<span slot="title">执行任务历史列表</span>
</el-menu-item>
</el-submenu>
<sub-menu
<!-- <sub-menu
v-for="menu in menuList"
:key="menu.menuId"
:menu="menu"
:dynamicMenuRoutes="dynamicMenuRoutes"
>
</sub-menu>
</sub-menu> -->
</el-menu>
</div>
</aside>
</template>
<script>
import SubMenu from './main-sidebar-sub-menu'
// import SubMenu from './main-sidebar-sub-menu'
import { isURL } from '@/utils/validate'
export default {
data () {
@ -302,9 +309,9 @@ export default {
dynamicMenuRoutes: []
}
},
components: {
SubMenu
},
// components: {
// SubMenu
// },
computed: {
sidebarLayoutSkin: {
get () {

View File

@ -1,3 +1,10 @@
<!--
* @Author: zwq
* @Date: 2021-11-15 08:20:28
* @LastEditors: zwq
* @LastEditTime: 2021-12-06 16:47:31
* @Description:
-->
<template>
<div
class="site-wrapper"
@ -32,7 +39,7 @@
},
data () {
return {
loading: true
loading: false
}
},
components: {
@ -73,17 +80,17 @@
},
//
getUserInfo () {
this.$http({
url: this.$http.adornUrl('/sys/user/info'),
method: 'get',
params: this.$http.adornParams()
}).then(({data}) => {
if (data && data.code === 0) {
this.loading = false
this.userId = data.user.userId
this.userName = data.user.username
}
})
// this.$http({
// url: this.$http.adornUrl('/sys/user/info'),
// method: 'get',
// params: this.$http.adornParams()
// }).then(({data}) => {
// if (data && data.code === 0) {
// this.loading = false
// this.userId = data.user.userId
// this.userName = data.user.username
// }
// })
}
}
}

View File

@ -2,24 +2,136 @@
* @Author: zwq
* @Date: 2021-11-19 11:23:44
* @LastEditors: zwq
* @LastEditTime: 2021-11-19 11:31:16
* @LastEditTime: 2021-12-08 14:42:18
* @Description:
-->
<template>
<el-dialog
title="订单详情"
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" ref="dataForm" label-width="80px">
<el-form-item label="参数名" prop="paramKey">
<el-input v-model="dataForm.paramKey" placeholder="参数名"></el-input>
</el-form-item>
<el-form-item label="参数值" prop="paramValue">
<el-input v-model="dataForm.paramValue" placeholder="参数值"></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
</el-form-item>
:visible.sync="visible"
>
<el-form :model="dataForm" ref="dataForm" label-width="100px">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="标识卡号" prop="idenCardNum">
<el-input
v-model="dataForm.idenCardNum"
placeholder="标识卡号"
readonly
></el-input>
</el-form-item>
<el-form-item label="订单状态" prop="taskType">
<el-input
v-model="dataForm.taskType"
placeholder="订单状态"
readonly
></el-input>
</el-form-item>
<el-form-item label="物料名称" prop="startPosition">
<el-input
v-model="dataForm.startPosition"
placeholder="物料名称"
readonly
></el-input>
</el-form-item>
<el-form-item label="产品名称" prop="productName">
<el-input
v-model="dataForm.productName"
placeholder="产品名称"
readonly
></el-input>
</el-form-item>
<el-form-item label="获取时间" prop="createTime">
<el-input
v-model="dataForm.createTime"
placeholder="获取时间"
readonly
></el-input>
</el-form-item>
<el-form-item label="任务状态" prop="status">
<el-input
v-model="dataForm.status"
placeholder="任务状态"
readonly
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="订单号" prop="orderNo">
<el-input
v-model="dataForm.orderNo"
placeholder="订单号"
readonly
></el-input>
</el-form-item>
<el-form-item label="客户名称" prop="customerName">
<el-input
v-model="dataForm.customerName"
placeholder="客户名称"
readonly
></el-input>
</el-form-item>
<el-form-item label="物料数量" prop="quantity">
<el-input
v-model="dataForm.quantity"
placeholder="物料数量"
readonly
></el-input>
</el-form-item>
<el-form-item label="材料牌号" prop="materialDes">
<el-input
v-model="dataForm.materialDes"
placeholder="材料牌号"
readonly
></el-input>
</el-form-item>
<el-form-item label="任务发起时间" prop="abeginTime">
<el-input
v-model="dataForm.abeginTime"
placeholder="任务发起时间"
readonly
></el-input>
</el-form-item>
<el-form-item label="物料重量" prop="weight">
<el-input
v-model="dataForm.weight"
placeholder="物料重量"
readonly
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="任务来源" prop="orderSource">
<el-input
v-model="dataForm.orderSource"
placeholder="任务来源"
readonly
></el-input>
</el-form-item>
<el-form-item label="单位" prop="unit">
<el-input
v-model="dataForm.unit"
placeholder="单位"
readonly
></el-input>
</el-form-item>
<el-form-item label="生产工艺要求" prop="craftIll">
<el-input
v-model="dataForm.craftIll"
placeholder="生产工艺要求"
readonly
></el-input>
</el-form-item>
<el-form-item label="实际加工重量" prop="finishWeight">
<el-input
v-model="dataForm.finishWeight"
placeholder="实际加工重量"
readonly
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
@ -28,39 +140,29 @@
</template>
<script>
export default {
data () {
return {
visible: false,
dataForm: {
id: 0,
paramKey: '',
paramValue: '',
remark: ''
}
}
},
methods: {
init (id) {
this.dataForm.id = id || 0
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.$http({
url: this.$http.adornUrl(`/sys/config/info/${this.dataForm.id}`),
method: 'get',
params: this.$http.adornParams()
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm.paramKey = data.config.paramKey
this.dataForm.paramValue = data.config.paramValue
this.dataForm.remark = data.config.remark
}
})
export default {
data () {
return {
visible: false,
dataForm: {}
}
},
methods: {
init (id) {
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
this.$http({
url: this.$http.adornUrl(`orderInfo/getDet`),
method: 'post',
data: this.$http.adornData({ id: id })
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataForm = data.data
}
})
}
})
}
}
}
</script>

View File

@ -2,86 +2,103 @@
<div class="mod-config">
<el-form :inline="true">
<el-form-item>
<el-button type="success" @click="$router.push({ name: 'order-current-order' })">返回当前订单列表</el-button>
<el-button
type="success"
@click="$router.push({ name: 'order-current-order' })"
>返回当前订单列表</el-button
>
</el-form-item>
</el-form>
<el-table
:data="dataList"
border
v-loading="dataListLoading"
style="width: 100%;">
style="width: 100%;"
>
<el-table-column
type="index"
header-align="center"
align="center"
label="序号"
width="50">
width="50"
>
</el-table-column>
<el-table-column
prop="paramKey"
prop="taskCode"
header-align="center"
align="center"
label="任务编码">
label="任务编码"
>
</el-table-column
><el-table-column
prop="abeginTime"
header-align="center"
align="center"
label="发起时间"
>
</el-table-column>
<el-table-column
prop="paramValue"
prop="aendTime"
header-align="center"
align="center"
label="发起时间">
label="完成时间"
>
</el-table-column>
<el-table-column
prop="taskType"
header-align="center"
align="center"
label="任务类型"
>
</el-table-column>
<el-table-column
prop="remark"
header-align="center"
align="center"
label="完成时间">
label="当前工序"
>
</el-table-column>
<el-table-column
prop="type"
prop="startPosition"
header-align="center"
align="center"
label="任务类型">
label="开始位置"
>
</el-table-column>
<el-table-column
prop="precess"
prop="targetPosition"
header-align="center"
align="center"
label="当前工序">
label="目标位置"
>
</el-table-column>
<el-table-column
prop="start"
prop="vehicleName"
header-align="center"
align="center"
label="开始位置">
label="车辆名称"
>
</el-table-column>
<el-table-column
prop="end"
prop="kilnName"
header-align="center"
align="center"
label="目标位置">
label="加工炉"
>
</el-table-column>
<el-table-column
prop="name"
prop="quantity"
header-align="center"
align="center"
label="车辆名称">
</el-table-column>
<el-table-column
prop="luzi"
header-align="center"
align="center"
label="加工炉">
</el-table-column>
<el-table-column
prop="num"
header-align="center"
align="center"
label="加工数量">
label="加工数量"
>
</el-table-column>
<el-table-column
prop="weight"
header-align="center"
align="center"
label="重量">
label="重量"
>
</el-table-column>
</el-table>
<el-pagination
@ -91,61 +108,65 @@
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
layout="total, sizes, prev, pager, next, jumper"
>
</el-pagination>
</div>
</template>
<script>
export default {
data () {
return {
dataList: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false
}
export default {
data () {
return {
dataList: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false
}
},
activated () {
this.getDataList()
},
created () {
this.orderNo = this.$route.query.orderNo
this.idenCardNum = this.$route.query.idenCardNum
},
methods: {
//
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/orderInfo/getTaskInfo'),
method: 'post',
data: this.$http.adornData({
current: this.pageIndex,
size: this.pageSize,
idenCardNum: this.idenCardNum,
orderNo: this.orderNo
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataList = data.data.records
this.totalPage = data.data.total
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
activated () {
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
created () {
console.log(this.$route.query.id)
},
methods: {
//
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/sys/config/list'),
method: 'get',
params: this.$http.adornParams({
'page': this.pageIndex,
'limit': this.pageSize
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
}
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
}
}
}
</script>

View File

@ -1,6 +1,6 @@
<template>
<div class="mod-config">
<el-form :model="dataForm" ref="dataForm" label-width="80px">
<!-- <el-form :model="dataForm" ref="dataForm" label-width="80px">
<el-form-item>
<el-button type="success" @click="$router.push({ name: 'order-current-task' })">返回当前执行任务</el-button>
</el-form-item>
@ -13,7 +13,7 @@
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
</el-form-item>
</el-form>
</el-form> -->
<el-table
:data="dataList"
border
@ -27,45 +27,46 @@
width="50">
</el-table-column>
<el-table-column
prop="paramKey"
prop="idenCardNum"
header-align="center"
align="center"
label="标识卡号">
</el-table-column>
<el-table-column
prop="paramValue"
prop="orderNo"
header-align="center"
align="center"
label="订单名">
</el-table-column>
<el-table-column
prop="remark"
prop="customerName"
header-align="center"
align="center"
label="客户名称">
</el-table-column>
<el-table-column
prop="name"
prop="productName"
header-align="center"
align="center"
label="产品名称">
</el-table-column>
<el-table-column
prop="type"
prop="productModel"
header-align="center"
align="center"
label="产品型号">
</el-table-column>
<el-table-column
prop="card"
prop="materialDes"
header-align="center"
align="center"
label="材料号牌">
</el-table-column>
<el-table-column
prop="need"
prop="craftIll"
header-align="center"
align="center"
width="120"
label="生产工艺要求">
</el-table-column>
<el-table-column
@ -75,7 +76,7 @@
label="单位">
</el-table-column>
<el-table-column
prop="num"
prop="quantity"
header-align="center"
align="center"
label="数量">
@ -109,6 +110,7 @@
remark: ''
},
dataList: [],
currTaskId: '',
pageIndex: 1,
pageSize: 10,
totalPage: 0,
@ -118,22 +120,26 @@
activated () {
this.getDataList()
},
created () {
console.log(this.$route.query.id)
this.currTaskId = this.$route.query.id
},
methods: {
//
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/sys/config/list'),
method: 'get',
params: this.$http.adornParams({
'page': this.pageIndex,
'limit': this.pageSize,
'paramKey': this.dataForm.paramKey
url: this.$http.adornUrl('/currTaskDet/getTaskDet'),
method: 'post',
data: this.$http.adornData({
'current': this.pageIndex,
'size': this.pageSize,
'currTaskId': this.currTaskId
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
this.dataList = data.data.records
this.totalPage = data.data.total
} else {
this.dataList = []
this.totalPage = 0

View File

@ -1,8 +1,8 @@
<template>
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form :inline="true" ref="dataForm" :rules="dataRule" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-select v-model="dataForm.card" filterable placeholder="标识卡号">
<el-select v-model="dataForm.idenCardNum" filterable placeholder="标识卡号">
<el-option
v-for="item in options1"
:key="item.value"
@ -13,7 +13,7 @@
</el-select>
</el-form-item>
<el-form-item>
<el-select v-model="dataForm.orderid" filterable placeholder="订单号">
<el-select v-model="dataForm.orderNo" filterable placeholder="订单号">
<el-option
v-for="item in options2"
:key="item.value"
@ -40,31 +40,31 @@
width="50">
</el-table-column>
<el-table-column
prop="paramKey"
prop="createTime"
header-align="center"
align="center"
label="获取时间">
</el-table-column>
<el-table-column
prop="paramValue"
prop="idenCardNum"
header-align="center"
align="center"
label="标识卡号">
</el-table-column>
<el-table-column
prop="paramKey"
prop="orderNo"
header-align="center"
align="center"
label="订单号">
</el-table-column>
<el-table-column
prop="paramKey"
prop="orderSource"
header-align="center"
align="center"
label="任务来源">
</el-table-column>
<el-table-column
prop="paramKey"
prop="status"
header-align="center"
align="center"
label="任务状态">
@ -76,37 +76,37 @@
label="订单状态">
</el-table-column>
<el-table-column
prop="paramKey"
prop="customerName"
header-align="center"
align="center"
label="客户名称">
</el-table-column>
<el-table-column
prop="paramKey"
prop="productName"
header-align="center"
align="center"
label="产品名称">
</el-table-column>
<el-table-column
prop="paramKey"
prop="materialDes"
header-align="center"
align="center"
label="物料名称">
</el-table-column>
<el-table-column
prop="paramKey"
prop="quantity"
header-align="center"
align="center"
label="物料数量">
</el-table-column>
<el-table-column
prop="paramKey"
prop="weight"
header-align="center"
align="center"
label="物料重量">
</el-table-column>
<el-table-column
prop="paramKey"
prop="waitWeight"
header-align="center"
align="center"
label="实际重量">
@ -118,7 +118,7 @@
width="80"
label="任务详情">
<template slot-scope="scope">
<el-button type="text" size="small" @click="LocationBtn(scope.row.id)">任务详情</el-button>
<el-button type="text" size="small" @click="LocationBtn(scope.row.idenCardNum, scope.row.orderNo)">任务详情</el-button>
</template>
</el-table-column>
<el-table-column
@ -138,7 +138,7 @@
width="150"
label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">完成</el-button>
<el-button type="text" size="small" @click="completeOrder(scope.row.id)">完成</el-button>
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">作废</el-button>
</template>
</el-table-column>
@ -163,8 +163,8 @@
data () {
return {
dataForm: {
card: '',
orderid: ''
idenCardNum: '',
orderNo: ''
},
dataList: [],
options1: [],
@ -173,37 +173,47 @@
pageSize: 10,
totalPage: 0,
dataListLoading: false,
orderDetailVisible: false
orderDetailVisible: false,
dataRule: {
idenCardNum: [
{ required: true, message: '标识卡号不能为空', trigger: 'change' }
],
orderNo: [
{ required: true, message: '订单号不能为空', trigger: 'change' }
]
}
}
},
components: {
orderDetail
},
activated () {
this.getDataList()
},
methods: {
//
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/sys/config/list'),
method: 'get',
params: this.$http.adornParams({
'page': this.pageIndex,
'limit': this.pageSize,
'orderid': this.dataForm.orderid,
'card': this.dataForm.card
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
} else {
this.dataList = []
this.totalPage = 0
this.$refs['dataForm'].validate((valid) => {
console.log(valid)
if (valid) {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('orderInfo/page'),
method: 'post',
data: this.$http.adornData({
'current': this.pageIndex,
'size': this.pageSize,
'orderNo': this.dataForm.orderNo,
'idenCardNum': this.dataForm.idenCardNum
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
}
this.dataListLoading = false
})
},
//
@ -217,6 +227,25 @@
this.pageIndex = val
this.getDataList()
},
completeOrder (id) { //
this.$http({
url: this.$http.adornUrl('orderInfo/completeOrder'),
method: 'post',
data: this.$http.adornData({
'id': id
})
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({
message: '操作成功',
type: 'success',
duration: 1500
})
} else {
this.$message.error(data.msg)
}
})
},
// /
addOrUpdateHandle (id) {
this.orderDetailVisible = true
@ -224,8 +253,8 @@
this.$refs.orderDetail.init(id)
})
},
LocationBtn (id) {
this.$router.push({name: 'order-current-order-task', query: {id}})
LocationBtn (idenCardNum, orderNo) {
this.$router.push({name: 'order-current-order-task', query: {idenCardNum, orderNo}})
},
//
deleteHandle (id) {
@ -235,7 +264,7 @@
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/sys/config/delete'),
url: this.$http.adornUrl('orderInfo/voidOrder'),
method: 'post',
data: this.$http.adornData(id, false)
}).then(({data}) => {

View File

@ -2,7 +2,7 @@
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-select v-model="dataForm.paramKey" filterable placeholder="车辆名称">
<el-select v-model="dataForm.vehicleId" filterable placeholder="车辆名称">
<el-option
v-for="item in options"
:key="item.value"
@ -14,7 +14,7 @@
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">查询</el-button>
<el-button type="primary" @click="handTask()">手动执行任务</el-button>
<!-- <el-button type="primary" @click="handTask()">手动执行任务</el-button> -->
</el-form-item>
</el-form>
<el-table
@ -30,19 +30,19 @@
width="50">
</el-table-column>
<el-table-column
prop="paramKey"
prop="taskCode"
header-align="center"
align="center"
label="任务编码">
</el-table-column>
<el-table-column
prop="paramValue"
prop="createTime"
header-align="center"
align="center"
label="发起时间">
</el-table-column>
<el-table-column
prop="remark"
prop="taskSource"
header-align="center"
align="center"
label="任务来源">
@ -54,25 +54,36 @@
label="任务状态">
</el-table-column>
<el-table-column
prop="type"
prop="taskType"
header-align="center"
align="center"
label="任务类型">
<template slot-scope="scope">
<span>{{
scope.row.taskType === 0
? "缓存到窑炉加工"
: scope.row.taskType === 1
? "出炉到缓存"
: scope.row.taskType === 2
? "缓存出库"
: "入库缓存"
}}</span>
</template>
</el-table-column>
<el-table-column
prop="start"
prop="startPosition"
header-align="center"
align="center"
label="开始位置">
</el-table-column>
<el-table-column
prop="end"
prop="targetPosition"
header-align="center"
align="center"
label="目标位置">
</el-table-column>
<el-table-column
prop="name"
prop="vehicleName"
header-align="center"
align="center"
label="车辆名称">
@ -87,6 +98,17 @@
<el-button type="text" size="small" @click="Detail(scope.row.id)">详情</el-button>
</template>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="120"
label="操作">
<template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">执行</el-button>
<el-button type="text" style="color:red" size="small" @click="deleteHandle(scope.row.sheetNo)">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
@size-change="sizeChangeHandle"
@ -105,7 +127,7 @@
data () {
return {
dataForm: {
paramKey: ''
vehicleId: ''
},
dataList: [],
options: [],
@ -123,17 +145,17 @@
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/sys/config/list'),
method: 'get',
params: this.$http.adornParams({
'page': this.pageIndex,
'limit': this.pageSize,
'paramKey': this.dataForm.paramKey
url: this.$http.adornUrl('currTask/currentTaskNow'),
method: 'post',
data: this.$http.adornData({
'current': this.pageIndex,
'size': this.pageSize,
'vehicleId': this.dataForm.vehicleId
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
this.dataList = data.data.records
this.totalPage = data.data.total
} else {
this.dataList = []
this.totalPage = 0
@ -159,16 +181,16 @@
this.$router.push({name: 'orderProcess'})
},
//
deleteHandle (id) {
this.$confirm(`确定对[id=${id}]进行删除操作?`, '提示', {
deleteHandle (sheetNo) {
this.$confirm(`确定对[生产单编号=${sheetNo}]进行删除操作?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http({
url: this.$http.adornUrl('/sys/config/delete'),
url: this.$http.adornUrl('currTask/deleteBySheetNo'),
method: 'post',
data: this.$http.adornData(id, false)
data: this.$http.adornData(sheetNo)
}).then(({data}) => {
if (data && data.code === 0) {
this.$message({

View File

@ -15,6 +15,7 @@
<el-form-item>
<el-date-picker
v-model="dataForm.time"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="至"
start-placeholder="开始日期"

View File

@ -2,24 +2,120 @@
* @Author: zwq
* @Date: 2021-11-19 11:23:44
* @LastEditors: zwq
* @LastEditTime: 2021-11-19 11:31:16
* @LastEditTime: 2021-12-08 10:38:21
* @Description:
-->
<template>
<el-dialog
title="订单详情"
:close-on-click-modal="false"
:visible.sync="visible">
<el-form :model="dataForm" ref="dataForm" label-width="80px">
<el-form-item label="参数名" prop="paramKey">
<el-input v-model="dataForm.paramKey" placeholder="参数名"></el-input>
</el-form-item>
<el-form-item label="参数值" prop="paramValue">
<el-input v-model="dataForm.paramValue" placeholder="参数值"></el-input>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="备注"></el-input>
</el-form-item>
:visible.sync="visible"
>
<el-form :model="dataForm" ref="dataForm" label-width="100px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="任务编码" prop="taskCode">
<el-input
v-model="dataForm.taskCode"
placeholder="任务编码"
readonly
></el-input>
</el-form-item>
<el-form-item label="任务类型" prop="taskType">
<el-input
v-model="dataForm.taskType"
placeholder="任务类型"
readonly
></el-input>
</el-form-item>
<el-form-item label="开始位置" prop="startPosition">
<el-input
v-model="dataForm.startPosition"
placeholder="开始位置"
readonly
></el-input>
</el-form-item>
<el-form-item label="托盘编号" prop="paramKey">
<el-input
v-model="dataForm.paramKey"
placeholder="托盘编号"
readonly
></el-input>
</el-form-item>
<el-form-item label="当前工序" prop="paramKey">
<el-input
v-model="dataForm.paramKey"
placeholder="当前工序"
readonly
></el-input>
</el-form-item>
<el-form-item label="是否到缓存区" prop="paramKey">
<el-input
v-model="dataForm.paramKey"
placeholder="是否到缓存区"
readonly
></el-input>
</el-form-item>
<el-form-item label="任务状态" prop="status">
<el-input
v-model="dataForm.status"
placeholder="任务状态"
readonly
></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务执行时间" prop="createTime">
<el-input
v-model="dataForm.createTime"
placeholder="任务执行时间"
readonly
></el-input>
</el-form-item>
<el-form-item label="运行车辆名" prop="vehicleName">
<el-input
v-model="dataForm.vehicleName"
placeholder="运行车辆名"
readonly
></el-input>
</el-form-item>
<el-form-item label="目标位位置" prop="targetPosition">
<el-input
v-model="dataForm.targetPosition"
placeholder="目标位位置"
readonly
></el-input>
</el-form-item>
<el-form-item label="任务执行时间" prop="updateTime">
<el-input
v-model="dataForm.updateTime"
placeholder="任务执行时间"
readonly
></el-input>
</el-form-item>
<el-form-item label="下一个工序" prop="paramKey">
<el-input
v-model="dataForm.paramKey"
placeholder="下一个工序"
readonly
></el-input>
</el-form-item>
<el-form-item label="窑炉名称" prop="kilnName">
<el-input
v-model="dataForm.kilnName"
placeholder="窑炉名称"
readonly
></el-input>
</el-form-item>
<el-form-item label="任务完成时间" prop="paramKey">
<el-input
v-model="dataForm.paramKey"
placeholder="任务完成时间"
readonly
></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
@ -28,39 +124,29 @@
</template>
<script>
export default {
data () {
return {
visible: false,
dataForm: {
id: 0,
paramKey: '',
paramValue: '',
remark: ''
}
}
},
methods: {
init (id) {
this.dataForm.id = id || 0
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
if (this.dataForm.id) {
this.$http({
url: this.$http.adornUrl(`/sys/config/info/${this.dataForm.id}`),
method: 'get',
params: this.$http.adornParams()
}).then(({data}) => {
if (data && data.code === 0) {
this.dataForm.paramKey = data.config.paramKey
this.dataForm.paramValue = data.config.paramValue
this.dataForm.remark = data.config.remark
}
})
export default {
data () {
return {
visible: false,
dataForm: {}
}
},
methods: {
init (id) {
this.visible = true
this.$nextTick(() => {
this.$refs['dataForm'].resetFields()
this.$http({
url: this.$http.adornUrl(`/orderInfoHis/getDet`),
method: 'post',
data: this.$http.adornData({ id: id })
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataForm = data.data
}
})
}
})
}
}
}
</script>

View File

@ -2,91 +2,110 @@
<div class="mod-config">
<el-form :inline="true">
<el-form-item>
<el-button type="success" @click="$router.push({ name: 'report-order-history' })">返回订单历史列表</el-button>
<el-button
type="success"
@click="$router.push({ name: 'report-order-history' })"
>返回订单历史列表</el-button
>
</el-form-item>
</el-form>
<el-table
:data="dataList"
border
v-loading="dataListLoading"
style="width: 100%;">
style="width: 100%;"
>
<el-table-column
type="index"
header-align="center"
align="center"
label="序号"
width="50">
width="50"
>
</el-table-column>
<el-table-column
prop="taskCode"
header-align="center"
align="center"
label="任务编码"
>
</el-table-column
><el-table-column
prop="abeginTime"
header-align="center"
align="center"
label="发起时间"
>
</el-table-column>
<el-table-column
prop="aendTime"
header-align="center"
align="center"
label="完成时间"
>
</el-table-column>
<el-table-column
prop="paramKey"
header-align="center"
align="center"
label="任务编码">
</el-table-column><el-table-column
prop="start"
header-align="center"
align="center"
label="发起时间">
label="任务来源"
>
</el-table-column>
<el-table-column
prop="end"
prop="taskType"
header-align="center"
align="center"
label="完成时间">
</el-table-column>
<el-table-column
prop="paramKey"
header-align="center"
align="center"
label="任务来源">
</el-table-column>
<el-table-column
prop="paramValue"
header-align="center"
align="center"
label="任务类型">
label="任务类型"
>
</el-table-column>
<el-table-column
prop="remark"
header-align="center"
align="center"
label="当前工序">
label="当前工序"
>
</el-table-column>
<el-table-column
prop="unit"
header-align="center"
align="center"
label="单位">
label="单位"
>
</el-table-column>
<el-table-column
prop="num"
prop="quantity"
header-align="center"
align="center"
label="数量">
label="数量"
>
</el-table-column>
<el-table-column
prop="weight"
header-align="center"
align="center"
label="重量">
label="重量"
>
</el-table-column>
<el-table-column
prop="start"
prop="startPosition"
header-align="center"
align="center"
label="开始位置">
label="开始位置"
>
</el-table-column>
<el-table-column
prop="end"
prop="targetPosition"
header-align="center"
align="center"
label="目标位置">
label="目标位置"
>
</el-table-column>
<el-table-column
prop="name"
prop="vehicleName"
header-align="center"
align="center"
label="车辆名称">
label="车辆名称"
>
</el-table-column>
</el-table>
<el-pagination
@ -96,61 +115,67 @@
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
layout="total, sizes, prev, pager, next, jumper"
>
</el-pagination>
</div>
</template>
<script>
export default {
data () {
return {
dataList: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false
}
export default {
data () {
return {
dataList: [],
idenCardNum: '',
orderNo: '',
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false
}
},
activated () {
this.getDataList()
},
created () {
this.orderNo = this.$route.query.orderNo
this.idenCardNum = this.$route.query.idenCardNum
},
methods: {
//
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/orderInfoHis/getTaskInfo'),
method: 'post',
data: this.$http.adornData({
current: this.pageIndex,
size: this.pageSize,
idenCardNum: this.idenCardNum,
orderNo: this.orderNo
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataList = data.data.records
this.totalPage = data.data.total
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
activated () {
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
created () {
console.log(this.$route.query.id)
},
methods: {
//
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/sys/config/list'),
method: 'get',
params: this.$http.adornParams({
'page': this.pageIndex,
'limit': this.pageSize
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
}
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
}
}
}
</script>

View File

@ -18,45 +18,46 @@
width="50">
</el-table-column>
<el-table-column
prop="paramKey"
prop="idenCardNum"
header-align="center"
align="center"
label="标识卡号">
</el-table-column>
<el-table-column
prop="paramValue"
prop="orderNo"
header-align="center"
align="center"
label="订单名">
</el-table-column>
<el-table-column
prop="remark"
prop="customerName"
header-align="center"
align="center"
label="客户名称">
</el-table-column>
<el-table-column
prop="name"
prop="productName"
header-align="center"
align="center"
label="产品名称">
</el-table-column>
<el-table-column
prop="type"
prop="productModel"
header-align="center"
align="center"
label="产品型号">
</el-table-column>
<el-table-column
prop="card"
prop="materialDes"
header-align="center"
align="center"
label="材料号牌">
</el-table-column>
<el-table-column
prop="need"
prop="craftIll"
header-align="center"
align="center"
width="120"
label="生产工艺要求">
</el-table-column>
<el-table-column
@ -66,7 +67,7 @@
label="单位">
</el-table-column>
<el-table-column
prop="num"
prop="quantity"
header-align="center"
align="center"
label="数量">
@ -94,6 +95,7 @@
export default {
data () {
return {
id: '',
dataList: [],
pageIndex: 1,
pageSize: 10,
@ -106,22 +108,24 @@
},
created () {
console.log(this.$route.query.id)
this.id = this.$route.query.id
},
methods: {
//
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/sys/config/list'),
method: 'get',
params: this.$http.adornParams({
'page': this.pageIndex,
'limit': this.pageSize
url: this.$http.adornUrl('/taskDetHis/getTaskDet'),
method: 'post',
data: this.$http.adornData({
'current': this.pageIndex,
'size': this.pageSize,
'currTaskId': this.id
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
this.dataList = data.data.records
this.totalPage = data.data.total
} else {
this.dataList = []
this.totalPage = 0

View File

@ -19,6 +19,7 @@
<el-form-item>
<el-date-picker
v-model="dataForm.time"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="至"
start-placeholder="开始日期"

View File

@ -2,7 +2,7 @@
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item>
<el-select v-model="dataForm.card" filterable placeholder="标识卡号">
<el-select v-model="dataForm.idenCardNum" filterable placeholder="标识卡号">
<el-option
v-for="item in options1"
:key="item.value"
@ -13,7 +13,7 @@
</el-select>
</el-form-item>
<el-form-item>
<el-select v-model="dataForm.orderid" filterable placeholder="订单号">
<el-select v-model="dataForm.orderNo" filterable placeholder="订单号">
<el-option
v-for="item in options2"
:key="item.value"
@ -40,43 +40,43 @@
width="50">
</el-table-column>
<el-table-column
prop="paramKey"
prop="createTime"
header-align="center"
align="center"
label="获取时间">
</el-table-column>
<el-table-column
prop="paramValue"
prop="idenCardNum"
header-align="center"
align="center"
label="标识卡号">
</el-table-column>
<el-table-column
prop="paramKey"
prop="orderNo"
header-align="center"
align="center"
label="订单号">
</el-table-column>
<el-table-column
prop="start"
prop="abeginTime"
header-align="center"
align="center"
label="发起时间">
</el-table-column>
<el-table-column
prop="end"
prop="aendTime"
header-align="center"
align="center"
label="完成时间">
</el-table-column>
<el-table-column
prop="paramKey"
prop="orderSource"
header-align="center"
align="center"
label="任务来源">
</el-table-column>
<el-table-column
prop="paramKey"
prop="status"
header-align="center"
align="center"
label="任务状态">
@ -88,25 +88,25 @@
label="订单状态">
</el-table-column>
<el-table-column
prop="paramKey"
prop="customerName"
header-align="center"
align="center"
label="客户名称">
</el-table-column>
<el-table-column
prop="paramKey"
prop="productName"
header-align="center"
align="center"
label="产品名称">
</el-table-column>
<el-table-column
prop="card"
prop="materialDes"
header-align="center"
align="center"
label="材料号牌">
</el-table-column>
<el-table-column
prop="paramKey"
prop="quantity"
header-align="center"
align="center"
label="数量">
@ -118,7 +118,7 @@
width="80"
label="任务详情">
<template slot-scope="scope">
<el-button type="text" size="small" @click="LocationBtn(scope.row.id)">任务详情</el-button>
<el-button type="text" size="small" @click="LocationBtn(scope.row.idenCardNum,scope.row.orderNo)">任务详情</el-button>
</template>
</el-table-column>
<el-table-column
@ -152,8 +152,8 @@
data () {
return {
dataForm: {
card: '',
orderid: ''
idenCardNum: '',
orderNo: ''
},
dataList: [],
options1: [],
@ -176,17 +176,18 @@
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/sys/config/list'),
method: 'get',
params: this.$http.adornParams({
'page': this.pageIndex,
'limit': this.pageSize,
'card': this.dataForm.card
url: this.$http.adornUrl('/orderInfoHis/page'),
method: 'post',
data: this.$http.adornData({
'current': this.pageIndex,
'size': this.pageSize,
'idenCardNum': this.dataForm.idenCardNum,
'orderNo': this.dataForm.orderNo
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
this.dataList = data.data.records
this.totalPage = data.data.total
} else {
this.dataList = []
this.totalPage = 0
@ -212,8 +213,8 @@
this.$refs.orderDetail.init(id)
})
},
LocationBtn (id) {
this.$router.push({name: 'report-order-history-task', query: {id}})
LocationBtn (idenCardNum, orderNo) {
this.$router.push({name: 'report-order-history-task', query: {idenCardNum, orderNo}})
}
}
}

View File

@ -1,19 +1,16 @@
<template>
<div class="mod-config">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form
:inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()"
>
<el-form-item>
<el-select v-model="dataForm.card" filterable placeholder="标识卡号">
<el-option
v-for="item in options1"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-select v-model="dataForm.orderid" filterable placeholder="车辆名称">
<el-select
v-model="dataForm.vehicleId"
filterable
placeholder="车辆名称"
>
<el-option
v-for="item in options2"
:key="item.value"
@ -27,6 +24,7 @@
<el-date-picker
v-model="dataForm.time"
type="daterange"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
@ -41,76 +39,94 @@
:data="dataList"
border
v-loading="dataListLoading"
style="width: 100%;">
style="width: 100%;"
>
<el-table-column
type="index"
header-align="center"
align="center"
label="序号"
width="50">
width="50"
>
</el-table-column>
<el-table-column
prop="paramKey"
prop="taskCode"
header-align="center"
align="center"
label="任务编码">
label="任务编码"
>
</el-table-column>
<el-table-column
prop="paramValue"
prop="createTime"
header-align="center"
align="center"
label="标识卡号">
label="发起时间"
>
</el-table-column>
<el-table-column
prop="start"
prop="taskSource"
header-align="center"
align="center"
label="发起时间">
label="任务来源"
>
</el-table-column>
<el-table-column
prop="paramKey"
prop="status"
header-align="center"
align="center"
label="任务来源">
label="任务状态"
>
</el-table-column>
<el-table-column
prop="paramKey"
prop="taskType"
header-align="center"
align="center"
label="任务状态">
label="任务类型"
>
<template slot-scope="scope">
<span>{{
scope.row.taskType === 0
? "缓存到窑炉加工"
: scope.row.taskType === 1
? "出炉到缓存"
: scope.row.taskType === 2
? "缓存出库"
: "入库缓存"
}}</span>
</template>
</el-table-column>
<el-table-column
prop="paramKey"
prop="startPosition"
header-align="center"
align="center"
label="任务类型">
label="开始位置"
>
</el-table-column>
<el-table-column
prop="start"
prop="targetPosition"
header-align="center"
align="center"
label="开始位置">
label="目标位置"
>
</el-table-column>
<el-table-column
prop="end"
prop="vehicleName"
header-align="center"
align="center"
label="目标位置">
</el-table-column>
<el-table-column
prop="name"
header-align="center"
align="center"
label="车辆名称">
label="车辆名称"
>
</el-table-column>
<el-table-column
fixed="right"
header-align="center"
align="center"
width="80"
label="订单详情">
label="订单详情"
>
<template slot-scope="scope">
<el-button type="text" size="small" @click="LocationBtn(scope.row.id)">订单详情</el-button>
<el-button type="text" size="small" @click="LocationBtn(scope.row.id)"
>订单详情</el-button
>
</template>
</el-table-column>
</el-table>
@ -121,70 +137,78 @@
:page-sizes="[10, 20, 50, 100]"
:page-size="pageSize"
:total="totalPage"
layout="total, sizes, prev, pager, next, jumper">
layout="total, sizes, prev, pager, next, jumper"
>
</el-pagination>
</div>
</template>
<script>
export default {
data () {
return {
dataForm: {
card: '',
orderid: '',
time: []
},
dataList: [],
options1: [],
options2: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false,
orderDetailVisible: false
}
export default {
data () {
return {
dataForm: {
vehicleId: '',
time: []
},
dataList: [],
options2: [],
pageIndex: 1,
pageSize: 10,
totalPage: 0,
dataListLoading: false,
orderDetailVisible: false
}
},
activated () {
this.getDataList()
},
methods: {
//
getDataList () {
this.dataListLoading = true
console.log(this.dataForm.time)
this.$http({
url: this.$http.adornUrl('/taskHis/taskHis'),
method: 'post',
data: this.$http.adornData({
current: this.pageIndex,
size: this.pageSize,
vehicleId: this.dataForm.vehicleId,
startTime:
this.dataForm.time && this.dataForm.time.length > 0
? this.dataForm.time[0]
: '',
endTime:
this.dataForm.time && this.dataForm.time.length > 0
? this.dataForm.time[1]
: ''
})
}).then(({ data }) => {
if (data && data.code === 0) {
this.dataList = data.data.records
this.totalPage = data.data.total
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
activated () {
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
methods: {
//
getDataList () {
this.dataListLoading = true
this.$http({
url: this.$http.adornUrl('/sys/config/list'),
method: 'get',
params: this.$http.adornParams({
'page': this.pageIndex,
'limit': this.pageSize,
'card': this.dataForm.card
})
}).then(({data}) => {
if (data && data.code === 0) {
this.dataList = data.page.list
this.totalPage = data.page.totalCount
} else {
this.dataList = []
this.totalPage = 0
}
this.dataListLoading = false
})
},
//
sizeChangeHandle (val) {
this.pageSize = val
this.pageIndex = 1
this.getDataList()
},
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
LocationBtn (id) {
this.$router.push({name: 'report-task-history-detail', query: {id}})
}
//
currentChangeHandle (val) {
this.pageIndex = val
this.getDataList()
},
LocationBtn (id) {
this.$router.push({ name: 'report-task-history-detail', query: { id } })
}
}
}
</script>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-15 08:20:28
* @LastEditors: zwq
* @LastEditTime: 2021-11-15 10:22:19
* @LastEditTime: 2021-12-07 14:48:08
* @Description:
*/
/**
@ -12,7 +12,7 @@
window.SITE_CONFIG = {}
// api接口请求地址
window.SITE_CONFIG['baseUrl'] = 'http://demo.open.renren.io/renren-fast-server'
window.SITE_CONFIG['baseUrl'] = 'http://192.168.0.134:8080/'
// cdn地址 = 域名 + 版本号
window.SITE_CONFIG['domain'] = './' // 域名