Compare commits

..

No commits in common. "2fda922944142c66ef95b8af4268a6fccb6f7ba5" and "ab898dda04761a18356bf17bf31a9a2825080087" have entirely different histories.

32 changed files with 885 additions and 1564 deletions

View File

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

View File

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

View File

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

View File

@ -1,10 +1,3 @@
/*
* @Author: zwq
* @Date: 2021-11-15 08:20:28
* @LastEditors: zwq
* @LastEditTime: 2021-12-08 14:18:09
* @Description:
*/
/** /**
* 全站路由配置 * 全站路由配置
* *
@ -13,6 +6,8 @@
*/ */
import Vue from 'vue' import Vue from 'vue'
import Router from 'vue-router' import Router from 'vue-router'
import http from '@/utils/httpRequest'
import { isURL } from '@/utils/validate'
import { clearLoginInfo } from '@/utils' import { clearLoginInfo } from '@/utils'
Vue.use(Router) Vue.use(Router)
@ -46,7 +41,6 @@ const mainRoutes = {
{ path: '/demo-echarts', component: _import('demo/echarts'), name: 'demo-echarts', meta: { title: 'demo-echarts', isTab: true } }, { 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: '/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-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-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-equipmentInfo', component: _import('basic/equipmentInfo'), name: 'basic-equipmentInfo', meta: { title: '设备基础信息' } },
{ path: '/basic-carInfo', component: _import('basic/carInfo'), name: 'basic-carInfo', meta: { title: '车辆信息' } }, { path: '/basic-carInfo', component: _import('basic/carInfo'), name: 'basic-carInfo', meta: { title: '车辆信息' } },
@ -85,6 +79,108 @@ const mainRoutes = {
const router = new Router({ const router = new Router({
mode: 'hash', mode: 'hash',
scrollBehavior: () => ({ y: 0 }), scrollBehavior: () => ({ y: 0 }),
isAddDynamicMenuRoutes: false, // 是否已经添加动态(菜单)路由
routes: globalRoutes.concat(mainRoutes) 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 export default router

View File

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

View File

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

View File

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

View File

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

View File

@ -1,65 +1,17 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2021-12-08 14:03:15
* @Description:
-->
<template> <template>
<el-dialog <el-dialog
:title="!dataForm.id ? '新增' : '修改'" :title="!dataForm.id ? '新增' : '修改'"
:close-on-click-modal="false" :close-on-click-modal="false"
:visible.sync="visible" :visible.sync="visible">
> <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="80px">
<el-form <el-form-item label="参数名" prop="paramKey">
:model="dataForm" <el-input v-model="dataForm.paramKey" placeholder="参数名"></el-input>
: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>
<el-form-item label="缓存区名称" prop="warehouseName"> <el-form-item label="参数值" prop="paramValue">
<el-input <el-input v-model="dataForm.paramValue" placeholder="参数值"></el-input>
v-model="dataForm.warehouseName"
placeholder="缓存区名称"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="英文名称" prop="alarmInfo"> <el-form-item label="备注" prop="remark">
<el-input <el-input v-model="dataForm.remark" placeholder="备注"></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-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
@ -70,82 +22,78 @@
</template> </template>
<script> <script>
export default { export default {
data () { data () {
return { return {
visible: false, visible: false,
dataForm: { dataForm: {
id: '', id: 0,
code: '', paramKey: '',
description: '', paramValue: '',
spec: '', remark: ''
warehouseName: '' },
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
}
})
}
})
}, },
dataRule: { //
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)
}
})
}
})
} }
} }
},
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> </script>

View File

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

View File

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

View File

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

View File

@ -1,126 +0,0 @@
<!--
* @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

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

View File

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

View File

@ -1,6 +1,5 @@
<template> <template>
<div class="mod-config"> <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 :inline="true">
<el-form-item> <el-form-item>
<el-button type="primary" @click="addOrUpdateHandle()">新增</el-button> <el-button type="primary" @click="addOrUpdateHandle()">新增</el-button>

View File

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

View File

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

View File

@ -2,136 +2,24 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-19 11:23:44 * @Date: 2021-11-19 11:23:44
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2021-12-08 14:42:18 * @LastEditTime: 2021-11-19 11:31:16
* @Description: * @Description:
--> -->
<template> <template>
<el-dialog <el-dialog
title="订单详情" title="订单详情"
:close-on-click-modal="false" :close-on-click-modal="false"
:visible.sync="visible" :visible.sync="visible">
> <el-form :model="dataForm" ref="dataForm" label-width="80px">
<el-form :model="dataForm" ref="dataForm" label-width="100px"> <el-form-item label="参数名" prop="paramKey">
<el-row :gutter="20"> <el-input v-model="dataForm.paramKey" placeholder="参数名"></el-input>
<el-col :span="8"> </el-form-item>
<el-form-item label="标识卡号" prop="idenCardNum"> <el-form-item label="参数值" prop="paramValue">
<el-input <el-input v-model="dataForm.paramValue" placeholder="参数值"></el-input>
v-model="dataForm.idenCardNum" </el-form-item>
placeholder="标识卡号" <el-form-item label="备注" prop="remark">
readonly <el-input v-model="dataForm.remark" placeholder="备注"></el-input>
></el-input> </el-form-item>
</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> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button> <el-button @click="visible = false">取消</el-button>
@ -140,29 +28,39 @@
</template> </template>
<script> <script>
export default { export default {
data () { data () {
return { return {
visible: false, visible: false,
dataForm: {} dataForm: {
} id: 0,
}, paramKey: '',
methods: { paramValue: '',
init (id) { remark: ''
this.visible = true }
this.$nextTick(() => { }
this.$refs['dataForm'].resetFields() },
this.$http({ methods: {
url: this.$http.adornUrl(`orderInfo/getDet`), init (id) {
method: 'post', this.dataForm.id = id || 0
data: this.$http.adornData({ id: id }) this.visible = true
}).then(({ data }) => { this.$nextTick(() => {
if (data && data.code === 0) { this.$refs['dataForm'].resetFields()
this.dataForm = data.data 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
}
})
} }
}) })
}) }
} }
} }
}
</script> </script>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,120 +2,24 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-11-19 11:23:44 * @Date: 2021-11-19 11:23:44
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2021-12-08 10:38:21 * @LastEditTime: 2021-11-19 11:31:16
* @Description: * @Description:
--> -->
<template> <template>
<el-dialog <el-dialog
title="订单详情" title="订单详情"
:close-on-click-modal="false" :close-on-click-modal="false"
:visible.sync="visible" :visible.sync="visible">
> <el-form :model="dataForm" ref="dataForm" label-width="80px">
<el-form :model="dataForm" ref="dataForm" label-width="100px"> <el-form-item label="参数名" prop="paramKey">
<el-row :gutter="20"> <el-input v-model="dataForm.paramKey" placeholder="参数名"></el-input>
<el-col :span="12"> </el-form-item>
<el-form-item label="任务编码" prop="taskCode"> <el-form-item label="参数值" prop="paramValue">
<el-input <el-input v-model="dataForm.paramValue" placeholder="参数值"></el-input>
v-model="dataForm.taskCode" </el-form-item>
placeholder="任务编码" <el-form-item label="备注" prop="remark">
readonly <el-input v-model="dataForm.remark" placeholder="备注"></el-input>
></el-input> </el-form-item>
</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> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button> <el-button @click="visible = false">取消</el-button>
@ -124,29 +28,39 @@
</template> </template>
<script> <script>
export default { export default {
data () { data () {
return { return {
visible: false, visible: false,
dataForm: {} dataForm: {
} id: 0,
}, paramKey: '',
methods: { paramValue: '',
init (id) { remark: ''
this.visible = true }
this.$nextTick(() => { }
this.$refs['dataForm'].resetFields() },
this.$http({ methods: {
url: this.$http.adornUrl(`/orderInfoHis/getDet`), init (id) {
method: 'post', this.dataForm.id = id || 0
data: this.$http.adornData({ id: id }) this.visible = true
}).then(({ data }) => { this.$nextTick(() => {
if (data && data.code === 0) { this.$refs['dataForm'].resetFields()
this.dataForm = data.data 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
}
})
} }
}) })
}) }
} }
} }
}
</script> </script>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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