merge:合并二期代码到当前分支
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
<!-- <div v-if="agvObj.car_no === '' || agvObj.car_no == null" class="grid-content bg-purple" style="height: 250px;background-color: white;border-bottom:3px solid rgb(240, 242, 245)">-->
|
||||
<!-- 请添加更多AGV设备-->
|
||||
<!-- </div>-->
|
||||
<div v-if="agvObj.car_no !== '' && agvObj.car_no != null" class="grid-content bg-purple" style="height: 400px;background-color: white;border-bottom:0px solid rgb(240, 242, 245)">
|
||||
<div v-if="agvObj.car_no !== '' && agvObj.car_no != null" class="grid-content bg-purple" style="height: 500px;background-color: white;border-bottom:0px solid rgb(240, 242, 245)">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<img
|
||||
@@ -55,9 +55,9 @@
|
||||
电量:
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-progress v-if="agvObj.electricity<=30" :text-inside="true" :stroke-width="25" :percentage="agvObj.electricity" status="exception" style="margin-top: 7px; margin-right: 5px;"/>
|
||||
<el-progress v-if="agvObj.electricity>30 && agvObj.electricity<100" :text-inside="true" :stroke-width="25" :percentage="agvObj.electricity" status="warning" style="margin-top: 7px; margin-right: 5px;"/>
|
||||
<el-progress v-if="agvObj.electricity == 100" :text-inside="true" :stroke-width="25" :percentage="agvObj.electricity" status="success" style="margin-top: 7px; margin-right: 5px;"/>
|
||||
<el-progress v-if="agvObj.electricity<=30" :text-inside="true" :stroke-width="25" :percentage="agvObj.electricity" status="exception" style="margin-top: 7px; margin-right: 5px;" />
|
||||
<el-progress v-if="agvObj.electricity>30 && agvObj.electricity<100" :text-inside="true" :stroke-width="25" :percentage="agvObj.electricity" status="warning" style="margin-top: 7px; margin-right: 5px;" />
|
||||
<el-progress v-if="agvObj.electricity == 100" :text-inside="true" :stroke-width="25" :percentage="agvObj.electricity" status="success" style="margin-top: 7px; margin-right: 5px;" />
|
||||
</el-col>
|
||||
</div>
|
||||
</el-row>
|
||||
@@ -83,10 +83,10 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="grid-content bg-purple" style="height: 50px;">
|
||||
<el-col :span="8" style="line-height: 40px; text-align: center">
|
||||
<el-col :span="8" style="line-height: 50px; text-align: center">
|
||||
报警:
|
||||
</el-col>
|
||||
<el-col :span="16" style="line-height: 40px; text-align: center">
|
||||
<el-col :span="16" style="line-height: 50px; text-align: center">
|
||||
{{ agvObj.fault }}
|
||||
</el-col>
|
||||
</div>
|
||||
|
||||
113
lms/nladmin-ui/src/views/wms/agvrush/deviceerror/index.vue
Normal file
113
lms/nladmin-ui/src/views/wms/agvrush/deviceerror/index.vue
Normal file
@@ -0,0 +1,113 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="设备区域">
|
||||
<el-select
|
||||
v-model="query.region_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.DEVICE_ERROR_REGION"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
:data="crud.data"
|
||||
size="mini"
|
||||
style="width: 100%;"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column prop="device_code" label="设备编码" show-overflow-tooltip />
|
||||
<el-table-column prop="device_name" label="设备名称 " show-overflow-tooltip />
|
||||
<el-table-column prop="region_code" label="所属区域 " show-overflow-tooltip />
|
||||
<el-table-column prop="error_code" label="异常编码 " show-overflow-tooltip />
|
||||
<el-table-column prop="error_message" label="故障信息" show-overflow-tooltip />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<!-- <pagination />-->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudFaultdevice from '@/views/wms/basedata/master/faultdevice/faultdevice'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'Deviceerror',
|
||||
dicts: ['DEVICE_ERROR_TYPE', 'IS_OR_NOT', 'DEVICE_ERROR_REGION', 'product_area'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '设备故障监控',
|
||||
url: 'api/faultdevice/getAllerrorDevice',
|
||||
optShow: {
|
||||
add: false,
|
||||
reset: true
|
||||
},
|
||||
idField: 'device_code',
|
||||
sort: 'device_code,desc',
|
||||
crudMethod: { ...crudFaultdevice }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {},
|
||||
tableData: [],
|
||||
rules: {
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
formatType1(row) {
|
||||
return this.dict.label.product_area[row.plant_code]
|
||||
},
|
||||
formatType2(row) {
|
||||
return this.dict.label.DEVICE_REGION_TYPE[row.region_code]
|
||||
},
|
||||
formatType3(row) {
|
||||
return this.dict.label.DEVICE_ERROR_TYPE[row.fault_type]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,35 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/bstIvtShafttubeivt',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/bstIvtShafttubeivt/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/bstIvtShafttubeivt',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function setHaveShaft(data) {
|
||||
return request({
|
||||
url: 'api/bstIvtShafttubeivt/setHaveShaft',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, setHaveShaft }
|
||||
125
lms/nladmin-ui/src/views/wms/agvrush/error/index.vue
Normal file
125
lms/nladmin-ui/src/views/wms/agvrush/error/index.vue
Normal file
@@ -0,0 +1,125 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="90px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="设备编码">
|
||||
<el-input
|
||||
v-model="query.device_code"
|
||||
clearable
|
||||
placeholder="输入设备编码"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
:loading="showDtlLoading"
|
||||
@click="downdtl"
|
||||
>
|
||||
导出Excel
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="deviceCode" label="设备编码" :min-width="flexWidth('deviceCode',crud.data,'设备编码')" />
|
||||
<el-table-column prop="deviceName" label="设备名称" :min-width="flexWidth('deviceName',crud.data,'设备名称')" />
|
||||
<el-table-column prop="errorCode" label="故障编码" :min-width="flexWidth('errorCode',crud.data,'故障编码')" />
|
||||
<el-table-column prop="errorMessage" label="故障描述" :min-width="flexWidth('errorMessage',crud.data,'故障描述')" />
|
||||
<el-table-column prop="startTime" label="开始时间" :min-width="flexWidth('startTime',crud.data,'开始时间')" />
|
||||
<el-table-column prop="duration" label="持续时长(S)" :min-width="flexWidth('duration',crud.data,'持续时长(S)')" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudBstIvtShafttubeivt from './bstIvtShafttubeivt'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation.vue'
|
||||
import crudOperation from '@crud/CRUD.operation.vue'
|
||||
import udOperation from '@crud/UD.operation.vue'
|
||||
import pagination from '@crud/Pagination.vue'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
|
||||
const defaultForm = {
|
||||
device_code: null,
|
||||
device_name: null,
|
||||
error_code: null,
|
||||
error_message: null,
|
||||
start_time: null,
|
||||
duration: null
|
||||
}
|
||||
export default {
|
||||
name: 'DeviceFault',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
showDtlLoading: false,
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '穿拔轴区点位库存管理',
|
||||
url: '/api/deviceFault',
|
||||
idField: 'id',
|
||||
sort: 'id,desc',
|
||||
crudMethod: { ...crudBstIvtShafttubeivt },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {},
|
||||
rules: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
downdtl() {
|
||||
this.showDtlLoading = true
|
||||
download('/api/deviceFault/download', this.crud.query).then(result => {
|
||||
debugger
|
||||
downloadFile(result, '设备故障统计', 'xlsx')
|
||||
this.showDtlLoading = false
|
||||
}).catch(() => {
|
||||
this.showDtlLoading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,324 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-input
|
||||
v-model="query.blurry"
|
||||
size="mini"
|
||||
clearable
|
||||
placeholder="输入名称或者描述搜索"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
<rrOperation/>
|
||||
</div>
|
||||
<crudOperation :permission="permission"/>
|
||||
</div>
|
||||
<!-- 表单渲染 -->
|
||||
<el-row :gutter="15">
|
||||
<!--角色管理-->
|
||||
<el-col :xs="24" :sm="24" :md="14" :lg="14" :xl="17" style="margin-bottom: 10px">
|
||||
<el-card class="box-card" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<span class="role-span">角色列表</span>
|
||||
</div>
|
||||
<el-table
|
||||
ref="table"
|
||||
v-loading="crud.loading"
|
||||
highlight-current-row
|
||||
style="width: 100%;"
|
||||
:data="crud.data"
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
<el-table-column show-overflow-tooltip prop="username" label="用户名"/>
|
||||
<el-table-column show-overflow-tooltip prop="person_name" label="姓名"/>
|
||||
<el-table-column prop="name" label="部门"/>
|
||||
<!--<el-table-column show-overflow-tooltip prop="dept" label="部门">
|
||||
<template slot-scope="scope">
|
||||
<div>{{ scope.row.dept.name }}</div>
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination/>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<!-- 菜单授权 -->
|
||||
<el-col :xs="24" :sm="24" :md="10" :lg="10" :xl="7">
|
||||
<el-card class="box-card" shadow="never">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-tooltip class="item" effect="dark" content="选择指定角色分配菜单" placement="top">
|
||||
<span class="role-span">区域选择</span>
|
||||
</el-tooltip>
|
||||
<el-button
|
||||
v-permission="['admin','roles:edit']"
|
||||
:disabled="!showButton"
|
||||
:loading="menuLoading"
|
||||
icon="el-icon-check"
|
||||
size="mini"
|
||||
style="float: right; padding: 6px 9px"
|
||||
type="primary"
|
||||
@click="saveMenu"
|
||||
>保存
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="tableData"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column prop="region_code" label="区域编码" />
|
||||
<el-table-column prop="region_name" label="区域名称" />
|
||||
</el-table>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudUserDevice from '@/views/wms/basedata/product/userDevice/userDevice'
|
||||
import { getDepts, getDeptSuperior } from '@/views/system/dept/dept'
|
||||
import { getChild, getMenusTree } from '@/views/system/menu/menu'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
import DateRangePicker from '@/components/DateRangePicker/index'
|
||||
|
||||
const defaultForm = { id: null, name: null, depts: [], description: null, dataScope: '全部', level: 3 }
|
||||
export default {
|
||||
name: 'UserStor',
|
||||
components: { Treeselect, pagination, crudOperation, rrOperation, udOperation, DateRangePicker },
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '角色',
|
||||
url: 'api/userStor',
|
||||
crudMethod: { ...crudUserDevice },
|
||||
optShow: { add: false, reset: false, edit: false, del: false }
|
||||
})
|
||||
},
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
data() {
|
||||
return {
|
||||
level: 3,
|
||||
currentId: 0, menuLoading: false, showButton: false,
|
||||
menus: [], menuIds: [], depts: [], deptDatas: [], // 多选时使用
|
||||
tableData: [{ 'region_code': 'B1Foil', 'region_name': 'B1生箔' }, { 'region_code': 'B1FQ', 'region_name': 'B1分切' }, { 'region_code': 'B2Foil', 'region_name': 'B2生箔' }, { 'region_code': 'B2FQ', 'region_name': 'B2分切' }, { 'region_code': 'CBJ', 'region_name': '穿拔轴区' }, { 'region_code': 'NBJ', 'region_name': '内包间' }, { 'region_code': 'RK', 'region_name': '入库区' }, { 'region_code': 'DDJ', 'region_name': '堆垛机' }, { 'region_code': 'CK', 'region_name': '出库区' }],
|
||||
currentRow: null,
|
||||
permission: {
|
||||
add: ['admin', 'roles:add'],
|
||||
edit: ['admin', 'roles:edit'],
|
||||
del: ['admin', 'roles:del']
|
||||
},
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: '请输入名称', trigger: 'blur' }
|
||||
],
|
||||
permission: [
|
||||
{ required: true, message: '请输入权限', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getMenuDatas(node, resolve) {
|
||||
setTimeout(() => {
|
||||
getMenusTree(node.data.id ? node.data.id : 0).then(res => {
|
||||
resolve(res)
|
||||
})
|
||||
}, 100)
|
||||
},
|
||||
[CRUD.HOOK.afterRefresh]() {
|
||||
this.$refs.menu.setCheckedKeys([])
|
||||
},
|
||||
// 新增前初始化部门信息
|
||||
[CRUD.HOOK.beforeToAdd]() {
|
||||
this.deptDatas = []
|
||||
},
|
||||
// 编辑前初始化自定义数据权限的部门信息
|
||||
[CRUD.HOOK.beforeToEdit](crud, form) {
|
||||
this.deptDatas = []
|
||||
if (form.dataScope === '自定义') {
|
||||
this.getSupDepts(form.depts)
|
||||
}
|
||||
const _this = this
|
||||
form.depts.forEach(function(dept) {
|
||||
_this.deptDatas.push(dept.id)
|
||||
})
|
||||
},
|
||||
// 提交前做的操作
|
||||
[CRUD.HOOK.afterValidateCU](crud) {
|
||||
if (crud.form.dataScope === '自定义' && this.deptDatas.length === 0) {
|
||||
this.$message({
|
||||
message: '自定义数据权限不能为空',
|
||||
type: 'warning'
|
||||
})
|
||||
return false
|
||||
} else if (crud.form.dataScope === '自定义') {
|
||||
const depts = []
|
||||
this.deptDatas.forEach(function(data) {
|
||||
const dept = { id: data }
|
||||
depts.push(dept)
|
||||
})
|
||||
crud.form.depts = depts
|
||||
} else {
|
||||
crud.form.depts = []
|
||||
}
|
||||
return true
|
||||
},
|
||||
// 触发单选
|
||||
handleCurrentChange(val) {
|
||||
if (val) {
|
||||
this.showButton = true
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.currentRow = val
|
||||
crudUserDevice.queryuserDevice(val).then(res => {
|
||||
res.forEach(row => {
|
||||
this.tableData.forEach(selected => {
|
||||
if (selected.region_code === row.region_code) {
|
||||
this.$refs.multipleTable.toggleRowSelection(selected, true)
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
menuChange(menu) {
|
||||
// 获取该节点的所有子节点,id 包含自身
|
||||
getChild(menu.id).then(childIds => {
|
||||
// 判断是否在 menuIds 中,如果存在则删除,否则添加
|
||||
if (this.menuIds.indexOf(menu.id) !== -1) {
|
||||
for (let i = 0; i < childIds.length; i++) {
|
||||
const index = this.menuIds.indexOf(childIds[i])
|
||||
if (index !== -1) {
|
||||
this.menuIds.splice(index, 1)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (let i = 0; i < childIds.length; i++) {
|
||||
const index = this.menuIds.indexOf(childIds[i])
|
||||
if (index === -1) {
|
||||
this.menuIds.push(childIds[i])
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$refs.menu.setCheckedKeys(this.menuIds)
|
||||
})
|
||||
},
|
||||
// 保存菜单
|
||||
saveMenu() {
|
||||
const row = {}
|
||||
row.jo = this.currentRow
|
||||
row.rows = this.$refs.multipleTable.selection
|
||||
crudUserDevice.save(row).then(res => {
|
||||
this.crud.notify('保存成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
},
|
||||
// 改变数据
|
||||
update() {
|
||||
// 无刷新更新 表格数据
|
||||
crudRoles.get(this.currentId).then(res => {
|
||||
for (let i = 0; i < this.crud.data.length; i++) {
|
||||
if (res.id === this.crud.data[i].id) {
|
||||
this.crud.data[i] = res
|
||||
break
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取部门数据
|
||||
getDepts() {
|
||||
getDepts({ enabled: true }).then(res => {
|
||||
this.depts = res.content.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
})
|
||||
},
|
||||
getSupDepts(depts) {
|
||||
const ids = []
|
||||
depts.forEach(dept => {
|
||||
ids.push(dept.id)
|
||||
})
|
||||
getDeptSuperior(ids).then(res => {
|
||||
const date = res.content
|
||||
this.buildDepts(date)
|
||||
this.depts = date
|
||||
})
|
||||
},
|
||||
buildDepts(depts) {
|
||||
depts.forEach(data => {
|
||||
if (data.children) {
|
||||
this.buildDepts(data.children)
|
||||
}
|
||||
if (data.hasChildren && !data.children) {
|
||||
data.children = null
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取弹窗内部门数据
|
||||
loadDepts({ action, parentNode, callback }) {
|
||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||
getDepts({ enabled: true, pid: parentNode.id }).then(res => {
|
||||
parentNode.children = res.content.map(function(obj) {
|
||||
if (obj.hasChildren) {
|
||||
obj.children = null
|
||||
}
|
||||
return obj
|
||||
})
|
||||
setTimeout(() => {
|
||||
callback()
|
||||
}, 200)
|
||||
})
|
||||
}
|
||||
},
|
||||
// 如果数据权限为自定义则获取部门数据
|
||||
changeScope() {
|
||||
if (this.form.dataScope === '自定义') {
|
||||
this.getDepts()
|
||||
}
|
||||
},
|
||||
checkboxT(row) {
|
||||
return row.level >= this.level
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
.role-span {
|
||||
font-weight: bold;
|
||||
color: #303133;
|
||||
font-size: 15px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
::v-deep .el-input-number .el-input__inner {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
::v-deep .vue-treeselect__multi-value {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
::v-deep .vue-treeselect__multi-value-item {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,43 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function queryStor(data) {
|
||||
return request({
|
||||
url: '/api/userDevice/queryStor',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function queryuserDevice(data) {
|
||||
return request({
|
||||
url: '/api/userDevice/queryUserDevice',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function save(data) {
|
||||
return request({
|
||||
url: '/api/userDevice/save',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getuserDevice(data) {
|
||||
return request({
|
||||
url: '/api/userDevice/getuserDevice',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getSect(data) {
|
||||
return request({
|
||||
url: '/api/userDevice/getSect',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { queryuserDevice, queryStor, save, getuserDevice, getSect }
|
||||
@@ -178,6 +178,53 @@
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
title="子卷步序信息"
|
||||
append-to-body
|
||||
:visible.sync="dtlVisible"
|
||||
destroy-on-close
|
||||
width="1000px"
|
||||
>
|
||||
<!--表格渲染-->
|
||||
<el-table
|
||||
:data="childrenList"
|
||||
>
|
||||
<el-table-column prop="container_name" label="子卷号" show-overflow-tooltip width="210px" />
|
||||
<el-table-column prop="spec" label="步序" show-overflow-tooltip width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.subSpec[scope.row.spec] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="result" label="执行结果" show-overflow-tooltip width="120">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.result.toString() }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="param" label="执行参数" show-overflow-tooltip width="150" />
|
||||
<el-table-column prop="msg" label="备注" show-overflow-tooltip width="150" />
|
||||
<el-table-column prop="create_time" label="创建时间">
|
||||
<template slot-scope="scope">
|
||||
{{ new Date(scope.row.create_time).toLocaleString() }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.result==false && scope.row.url"
|
||||
type="danger"
|
||||
class="filter-item"
|
||||
size="mini"
|
||||
icon="el-icon-position"
|
||||
@click.native.prevent="syncMes(scope.row)"
|
||||
>同步</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dtlVisible = false">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
:before-close="crud.cancelCU"
|
||||
@@ -749,6 +796,8 @@ import pagination from '@crud/Pagination'
|
||||
import { download } from '@/api/data'
|
||||
import { downloadFile } from '@/utils'
|
||||
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||
import crudPastivtquery from '@/views/wms/stat/pastivt/pastivtquery'
|
||||
import { format } from 'date-fns'
|
||||
|
||||
const defaultForm = {
|
||||
workorder_id: null,
|
||||
@@ -788,7 +837,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'Subpackagerelation',
|
||||
dicts: ['sub_package_relation', 'IS_OR_NOT'],
|
||||
dicts: ['sub_package_relation', 'IS_OR_NOT', 'subSpec'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
@@ -803,6 +852,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dtlVisible: false,
|
||||
childrenList: [],
|
||||
permission: {
|
||||
add: ['admin', 'sub:add'],
|
||||
edit: ['admin', 'sub:edit'],
|
||||
@@ -892,10 +943,28 @@ export default {
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit](row) {
|
||||
this.$delete(row.form, 'status')
|
||||
return true
|
||||
toView(data) {
|
||||
crudPastivtquery.subRecord(data).then(res => {
|
||||
if (res) {
|
||||
this.dtlVisible = true
|
||||
this.childrenList = res
|
||||
}
|
||||
})
|
||||
},
|
||||
async syncMes(row) {
|
||||
const url = 'http://10.1.3.36:8081/' + row.url
|
||||
const response = await fetch(url, {
|
||||
method: 'POST', // *GET, POST, PUT, DELETE, etc.
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
// 'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
body: row.param // body 数据类型必须与“Content-Type”头匹配
|
||||
})
|
||||
const data = await response.json()
|
||||
window.alert(JSON.stringify(data))
|
||||
},
|
||||
|
||||
initQuery() {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
|
||||
@@ -321,6 +321,18 @@
|
||||
>
|
||||
设置右卷
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
v-permission="['urgent']"
|
||||
class="filter-item"
|
||||
type="danger"
|
||||
icon="el-icon-warning-outline"
|
||||
size="mini"
|
||||
:disabled="crud.selections.length < 1"
|
||||
@click="urgentPlan"
|
||||
>
|
||||
加急
|
||||
</el-button>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="1200px">
|
||||
@@ -488,7 +500,7 @@
|
||||
<el-table-column v-if="false" prop="workorder_id" label="分切计划标识" />
|
||||
<el-table-column prop="status" label="状态" :formatter="formatStatusName" />
|
||||
<el-table-column prop="order_type" label="订单类型" :formatter="formatTypeName" />
|
||||
<el-table-column prop="mfg_order_name" label="订单号" min-width="200" >
|
||||
<el-table-column prop="mfg_order_name" label="订单号" min-width="220">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="primary" @click="toView2(scope.$index, scope.row)">{{ scope.row.mfg_order_name }}</el-link>
|
||||
</template>
|
||||
@@ -724,6 +736,68 @@ export default {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
},
|
||||
urgentPlan() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
const data = {
|
||||
'data': _selectData
|
||||
}
|
||||
crudSlittingproductionplan.urgentPlan(data).then(res => {
|
||||
this.crud.toQuery()
|
||||
if (res.failInfo.length == 0) {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
} else {
|
||||
this.$notify({
|
||||
title: '操作结果',
|
||||
dangerouslyUseHTMLString: true,
|
||||
message: this.buildNotificationContent(res),
|
||||
duration: 0,
|
||||
offset: 50,
|
||||
customClass: 'custom-notify'
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
buildNotificationContent(data) {
|
||||
console.log('通知数据:', data)
|
||||
|
||||
// 第一行:统计信息
|
||||
const stats = `<div>总数:${data.total},成功:${data.success},失败:${data.fail}</div>`
|
||||
|
||||
// 第二行:失败信息表格
|
||||
let tableHtml = ''
|
||||
|
||||
if (data.failInfo && Object.keys(data.failInfo).length > 0) {
|
||||
// 创建表头
|
||||
const headers = `<tr style="background-color: #f5f5f5;">
|
||||
<th style="padding: 5px; text-align: left;">卷号</th>
|
||||
<th style="padding: 5px; text-align: left;">信息</th>
|
||||
</tr>`
|
||||
|
||||
// 创建表格行
|
||||
const rows = Object.values(data.failInfo).flatMap(errorObj => {
|
||||
return Object.entries(errorObj).map(([volumeNo, errorMsg]) => {
|
||||
return `<tr>
|
||||
<td style="padding: 5px; border: 1px solid #ddd;">${volumeNo}</td>
|
||||
<td style="padding: 5px; border: 1px solid #ddd;">${errorMsg}</td>
|
||||
</tr>`
|
||||
})
|
||||
}).join('')
|
||||
|
||||
tableHtml = `
|
||||
<div style="margin-top: 10px;">
|
||||
<div>失败信息:</div>
|
||||
<table border="1" style="border-collapse: collapse; width: 100%; margin-top: 5px;">
|
||||
${headers}
|
||||
${rows}
|
||||
</table>
|
||||
</div>
|
||||
`
|
||||
} else {
|
||||
tableHtml = '<div style="margin-top: 10px;">无失败信息</div>'
|
||||
}
|
||||
|
||||
return `${stats}${tableHtml}`
|
||||
},
|
||||
inFinish() {
|
||||
const _selectData = this.$refs.table.selection
|
||||
const data = {
|
||||
@@ -810,5 +884,4 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
@@ -71,6 +71,14 @@ export function setDirection(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function urgentPlan(data) {
|
||||
return request({
|
||||
url: 'api/slittingproductionplan/urgentPlan',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export function updates(data) {
|
||||
return request({
|
||||
url: 'api/slittingproductionplan',
|
||||
@@ -79,4 +87,4 @@ export function updates(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, upMaterFinish, caseFinish, sendFinish, inFinish, compelFinish, setDirection, updates }
|
||||
export default { add, edit, del, upMaterFinish, caseFinish, sendFinish, inFinish, compelFinish, setDirection, updates, urgentPlan }
|
||||
|
||||
@@ -15,11 +15,11 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="工单号" prop="mfgOrder">
|
||||
<label slot="label">工单号:</label>
|
||||
<el-input v-model="form.mfgOrder" disabled clearable style="width: 300px" />
|
||||
<el-input v-model="form.mfgOrder" disabled clearable style="width: 300px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="木箱编码" prop="productName">
|
||||
<label slot="label">木箱编码:</label>
|
||||
<el-input v-model="form.productName" disabled clearable style="width: 300px" />
|
||||
<el-input v-model="form.productName" disabled clearable style="width: 300px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="木箱描述" prop="description">
|
||||
<el-select
|
||||
@@ -45,7 +45,30 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="管芯描述" prop="carrierDescription">
|
||||
<label slot="label">管芯描述:</label>
|
||||
<el-input v-model="form.carrierDescription" disabled clearable style="width: 300px" />
|
||||
<el-input v-model="form.carrierDescription" disabled clearable style="width: 300px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="同类木箱编码" prop="sameBoxCode">
|
||||
<label slot="label">同类木箱编码:</label>
|
||||
<el-input v-model="form.sameBoxCode" disabled clearable style="width: 300px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="同类木箱描述" prop="sameBoxName">
|
||||
<el-select
|
||||
v-model="form.sameBoxName"
|
||||
placeholder="木箱描述"
|
||||
style="width: 400px"
|
||||
multiple
|
||||
class="filter-item"
|
||||
clearable
|
||||
filterable
|
||||
@change="hand2"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typelist"
|
||||
:key="item.box_type"
|
||||
:label="item.box_name"
|
||||
:value="item.box_type"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
@@ -101,6 +124,9 @@ export default {
|
||||
hand(value) {
|
||||
this.form.productName = value
|
||||
},
|
||||
hand2(value) {
|
||||
this.form.sameBoxCode = value
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:dialogShow', false)
|
||||
this.form = {}
|
||||
|
||||
Reference in New Issue
Block a user