站台监控增加是否允许装载机、是否允许平地机。
This commit is contained in:
parent
02c3d6d7eb
commit
a698ec0e84
|
|
@ -1,6 +1,6 @@
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
axios.defaults.baseURL = 'https://login.microsoftonline.com/caterpillar.onmicrosoft.com'
|
axios.defaults.baseURL = 'https://login.microsoftonline.com/caterpillar.onmicrosoft.com'
|
||||||
axios.defaults.timeout = 5000;
|
axios.defaults.timeout = 50000;
|
||||||
// axios.defaults.withCredentials = true
|
// axios.defaults.withCredentials = true
|
||||||
|
|
||||||
const postToGetToken = (params) => {
|
const postToGetToken = (params) => {
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,18 @@
|
||||||
<div style="display: flex;justify-content: space-between;">
|
<div style="display: flex;justify-content: space-between;">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-input v-model="standIdQuery" style="width: 158px; margin-right: 10px;" placeholder="站台号"
|
<el-input v-model="standIdQuery" style="width: 158px; margin-right: 10px;" placeholder="站台号"
|
||||||
:suffix-icon="Search" />
|
:suffix-icon="Search"/>
|
||||||
<el-select-v2 v-model="standTypeQuery" style="width: 158px; margin-right: 10px;"
|
<el-select-v2 v-model="standTypeQuery" style="width: 158px; margin-right: 10px;"
|
||||||
placeholder="请选择站台类型" :options="standTypeOptions" @change="search()"></el-select-v2>
|
placeholder="请选择站台类型" :options="standTypeOptions" @change="search()"></el-select-v2>
|
||||||
|
<el-select-v2 v-model="allowMwlQuery" style="width: 158px; margin-right: 10px;"
|
||||||
|
placeholder="是否允许装载机" :options="yesOrNoOptions" @change="search()"></el-select-v2>
|
||||||
|
<el-select-v2 v-model="allowMgQuery" style="width: 158px; margin-right: 10px;"
|
||||||
|
placeholder="是否允许平地机" :options="yesOrNoOptions" @change="search()"></el-select-v2>
|
||||||
<el-button type="primary" @click="search()">搜索</el-button>
|
<el-button type="primary" @click="search()">搜索</el-button>
|
||||||
<el-button type="warning" @click="reset()">重置</el-button>
|
<el-button type="warning" @click="reset()">重置</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br/>
|
||||||
<el-table :data="standList" stripe border v-loading="loading" class="table-class" highlight-current-row
|
<el-table :data="standList" stripe border v-loading="loading" class="table-class" highlight-current-row
|
||||||
max-height="650px" @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
|
max-height="650px" @row-click="getCurrentRow" :header-cell-style="{ 'text-align': 'center' }"
|
||||||
:cell-style="{ 'text-align': 'center' }">
|
:cell-style="{ 'text-align': 'center' }">
|
||||||
|
|
@ -20,37 +24,43 @@
|
||||||
<el-radio :label="scope.row.standId" v-model="standId"> </el-radio>
|
<el-radio :label="scope.row.standId" v-model="standId"> </el-radio>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="standId" label="id" fixed="left" min-width="120px" show-overflow-tooltip />
|
<el-table-column prop="standId" label="id" fixed="left" min-width="120px" show-overflow-tooltip/>
|
||||||
<el-table-column prop="allowIn" label="允许入库" min-width="120px" show-overflow-tooltip />
|
<el-table-column prop="allowIn" label="允许入库" :formatter="yesOrNoFormat" min-width="120px"
|
||||||
<el-table-column prop="allowOut" label="允许出库" min-width="120px" show-overflow-tooltip />
|
show-overflow-tooltip/>
|
||||||
|
<el-table-column prop="allowOut" label="允许出库" :formatter="yesOrNoFormat" min-width="120px"
|
||||||
|
show-overflow-tooltip/>
|
||||||
|
<el-table-column prop="allowMwl" label="允许装载机" :formatter="yesOrNoFormat" min-width="120px"
|
||||||
|
show-overflow-tooltip/>
|
||||||
|
<el-table-column prop="allowMg" label="允许平地机" :formatter="yesOrNoFormat" min-width="120px"
|
||||||
|
show-overflow-tooltip/>
|
||||||
<el-table-column prop="isLock" label="锁定" :formatter="isLockFormat" min-width="120px"
|
<el-table-column prop="isLock" label="锁定" :formatter="isLockFormat" min-width="120px"
|
||||||
show-overflow-tooltip />
|
show-overflow-tooltip/>
|
||||||
<el-table-column prop="standStatus" label="状态" :formatter="standStatusFormat" show-overflow-tooltip
|
<el-table-column prop="standStatus" label="状态" :formatter="standStatusFormat" show-overflow-tooltip
|
||||||
min-width="120px" />
|
min-width="120px"/>
|
||||||
<el-table-column prop="equipmentId" label="设备号" min-width="120px" show-overflow-tooltip />
|
<el-table-column prop="equipmentId" label="设备号" min-width="120px" show-overflow-tooltip/>
|
||||||
<el-table-column prop="areaId" label="区域" min-width="120px" />
|
<el-table-column prop="areaId" label="区域" min-width="120px"/>
|
||||||
<el-table-column prop="standType" label="类型" :formatter="standTypeFormat" min-width="120px" />
|
<el-table-column prop="standType" label="类型" :formatter="standTypeFormat" min-width="120px"/>
|
||||||
<el-table-column prop="standIp" label="电脑ip地址" min-width="120px" />
|
<el-table-column prop="standIp" label="电脑ip地址" min-width="120px"/>
|
||||||
<el-table-column prop="outerId" label="外部编号" min-width="120px" />
|
<el-table-column prop="outerId" label="外部编号" min-width="120px"/>
|
||||||
<el-table-column prop="lastUseTime" label="上次使用时间" :formatter="timeFormat" min-width="120px"
|
<el-table-column prop="lastUseTime" label="上次使用时间" :formatter="timeFormat" min-width="120px"
|
||||||
show-overflow-tooltip />
|
show-overflow-tooltip/>
|
||||||
<el-table-column prop="pickGoods" label="拣选料号" show-overflow-tooltip min-width="120px" />
|
<el-table-column prop="pickGoods" label="拣选料号" show-overflow-tooltip min-width="120px"/>
|
||||||
<el-table-column prop="pickVehicle" label="拣选箱号" show-overflow-tooltip min-width="120px" />
|
<el-table-column prop="pickVehicle" label="拣选箱号" show-overflow-tooltip min-width="120px"/>
|
||||||
<el-table-column prop="pickTip" label="提示" show-overflow-tooltip min-width="120px" />
|
<el-table-column prop="pickTip" label="提示" show-overflow-tooltip min-width="120px"/>
|
||||||
<el-table-column prop="pickVehicleCount" label="站台料箱数量" min-width="120px" />
|
<el-table-column prop="pickVehicleCount" label="站台料箱数量" min-width="120px"/>
|
||||||
<el-table-column prop="allowNoPlan" label="非计划" :formatter="allowNoPlanFormat" show-overflow-tooltip
|
<el-table-column prop="allowNoPlan" label="非计划" :formatter="allowNoPlanFormat" show-overflow-tooltip
|
||||||
min-width="120px" />
|
min-width="120px"/>
|
||||||
<el-table-column fixed="right" label="操作" width="120px">
|
<el-table-column fixed="right" label="操作" width="120px">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-button plain type="primary" @click="editCurrentRow(scope.row)">编辑</el-button>
|
<el-button plain type="primary" @click="editCurrentRow(scope.row)">编辑</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<br />
|
<br/>
|
||||||
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 25, 50]"
|
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 25, 50]"
|
||||||
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
:small="false" :disabled="false" :background="false" :default-page-size="10"
|
||||||
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="search"
|
||||||
@current-change="search" />
|
@current-change="search"/>
|
||||||
<el-dialog v-model="dialogVisible" title="编辑站台信息" width="40%" draggable :show-close="false">
|
<el-dialog v-model="dialogVisible" title="编辑站台信息" width="40%" draggable :show-close="false">
|
||||||
<div
|
<div
|
||||||
style="max-width: 100%; max-height: 500px; overflow: auto; display: flex; justify-content: center;">
|
style="max-width: 100%; max-height: 500px; overflow: auto; display: flex; justify-content: center;">
|
||||||
|
|
@ -59,7 +69,7 @@
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="站台号" prop="standId">
|
<el-form-item label="站台号" prop="standId">
|
||||||
<el-input v-model="standFormEntity.standId" disabled />
|
<el-input v-model="standFormEntity.standId" disabled/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
|
@ -83,17 +93,31 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row :gutter="16">
|
||||||
|
<el-col :span="12" :offset="0">
|
||||||
|
<el-form-item label="允许装载机" prop="allowMwl">
|
||||||
|
<el-select-v2 v-model="standFormEntity.allowMwl" placeholder="是否允许装载机"
|
||||||
|
:options="yesOrNoOptions" :disabled="standFormEntity.standType != 2"></el-select-v2>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="允许平地机" prop="allowMg">
|
||||||
|
<el-select-v2 v-model="standFormEntity.allowMg" placeholder="是否允许平地机"
|
||||||
|
:options="yesOrNoOptions" :disabled="standFormEntity.standType != 2"></el-select-v2>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="12" :offset="0">
|
<el-col :span="12" :offset="0">
|
||||||
<el-form-item label="上次使用时间" prop="lastUseTime">
|
<el-form-item label="上次使用时间" prop="lastUseTime">
|
||||||
<el-input v-model="standFormEntity.lastUseTime" />
|
<el-input v-model="standFormEntity.lastUseTime"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="站台料箱数量" prop="pickVehicleCount">
|
<el-form-item label="站台料箱数量" prop="pickVehicleCount">
|
||||||
<el-input-number v-model.number="standFormEntity.pickVehicleCount"
|
<el-input-number v-model.number="standFormEntity.pickVehicleCount"
|
||||||
controls-position="right" :disabled="standFormEntity.standType != 2"
|
controls-position="right" :disabled="standFormEntity.standType != 2"
|
||||||
clearable />
|
clearable/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -123,12 +147,12 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { getStandsByPage, updateStandInfo } from '@/api/stand.js'
|
import {getStandsByPage, updateStandInfo} from '@/api/stand.js'
|
||||||
import { errorBox } from '@/utils/myMessageBox.js'
|
import {errorBox} from '@/utils/myMessageBox.js'
|
||||||
import { ElMessage } from 'element-plus'
|
import {ElMessage} from 'element-plus'
|
||||||
import { ref, reactive } from 'vue'
|
import {ref, reactive} from 'vue'
|
||||||
import { dateFormatter, timeFormatter } from '@/utils/formatter.js'
|
import {dateFormatter, timeFormatter} from '@/utils/formatter.js'
|
||||||
import { Search } from '@element-plus/icons-vue'
|
import {Search} from '@element-plus/icons-vue'
|
||||||
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -142,6 +166,8 @@ export default {
|
||||||
total: 0,
|
total: 0,
|
||||||
standIdQuery: '',
|
standIdQuery: '',
|
||||||
standTypeQuery: -99,
|
standTypeQuery: -99,
|
||||||
|
allowMwlQuery: -99,
|
||||||
|
allowMgQuery: -99,
|
||||||
loading: true,
|
loading: true,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
standId: '',
|
standId: '',
|
||||||
|
|
@ -177,6 +203,20 @@ export default {
|
||||||
label: '已锁定'
|
label: '已锁定'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
yesOrNoOptions: [
|
||||||
|
{
|
||||||
|
value: -99,
|
||||||
|
label: '全部'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 0,
|
||||||
|
label: '否'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '是'
|
||||||
|
},
|
||||||
|
],
|
||||||
standStatusOptions: [
|
standStatusOptions: [
|
||||||
{
|
{
|
||||||
value: 0,
|
value: 0,
|
||||||
|
|
@ -209,7 +249,9 @@ export default {
|
||||||
pageNo: this.currentPage,
|
pageNo: this.currentPage,
|
||||||
pageSize: this.pageSize,
|
pageSize: this.pageSize,
|
||||||
standId: this.standIdQuery.trim(),
|
standId: this.standIdQuery.trim(),
|
||||||
standType: this.standTypeQuery == -99 ? null : this.standTypeQuery,
|
standType: this.standTypeQuery === -99 ? null : this.standTypeQuery,
|
||||||
|
allowMwl: this.allowMwlQuery === -99 ? null : this.allowMwlQuery,
|
||||||
|
allowMg: this.allowMgQuery === -99 ? null : this.allowMgQuery,
|
||||||
userName: store.getters.getUserName
|
userName: store.getters.getUserName
|
||||||
}
|
}
|
||||||
getStandsByPage(request).then(res => {
|
getStandsByPage(request).then(res => {
|
||||||
|
|
@ -254,6 +296,16 @@ export default {
|
||||||
return '未知'
|
return '未知'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
yesOrNoFormat: (row, column, cellValue, index) => {
|
||||||
|
switch (cellValue) {
|
||||||
|
case 0:
|
||||||
|
return '否'
|
||||||
|
case 1:
|
||||||
|
return '是'
|
||||||
|
default:
|
||||||
|
return '未知'
|
||||||
|
}
|
||||||
|
},
|
||||||
standStatusFormat: (row, column, cellValue, index) => {
|
standStatusFormat: (row, column, cellValue, index) => {
|
||||||
switch (cellValue) {
|
switch (cellValue) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
@ -288,14 +340,19 @@ export default {
|
||||||
standStatus: row.standStatus,
|
standStatus: row.standStatus,
|
||||||
lastUseTime: row.lastUseTime,
|
lastUseTime: row.lastUseTime,
|
||||||
pickVehicleCount: row.pickVehicleCount,
|
pickVehicleCount: row.pickVehicleCount,
|
||||||
allowNoPlan: row.allowNoPlan
|
allowNoPlan: row.allowNoPlan,
|
||||||
|
allowMwl: row.allowMwl,
|
||||||
|
allowMg: row.allowMg,
|
||||||
}
|
}
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
},
|
},
|
||||||
submitInfo(formData) {
|
submitInfo(formData) {
|
||||||
if (formData.standType == 3) {
|
if (formData.standType == 3 && formData.allowNoPlan == 1) {
|
||||||
return errorBox('堆垛机不允许非计划。')
|
return errorBox('堆垛机不允许非计划。')
|
||||||
}
|
}
|
||||||
|
if (formData.allowMwl == -99 || formData.allowMg == -99) {
|
||||||
|
return errorBox('必须确定是否允许装载机与是否允许平地机。')
|
||||||
|
}
|
||||||
const params = {
|
const params = {
|
||||||
standId: formData.standId,
|
standId: formData.standId,
|
||||||
standType: formData.standType,
|
standType: formData.standType,
|
||||||
|
|
@ -304,6 +361,8 @@ export default {
|
||||||
lastUseTime: formData.lastUseTime,
|
lastUseTime: formData.lastUseTime,
|
||||||
pickVehicleCount: formData.pickVehicleCount,
|
pickVehicleCount: formData.pickVehicleCount,
|
||||||
allowNoPlan: formData.allowNoPlan,
|
allowNoPlan: formData.allowNoPlan,
|
||||||
|
allowMwl: formData.allowMwl,
|
||||||
|
allowMg: formData.allowMg,
|
||||||
userName: store.getters.getUserName
|
userName: store.getters.getUserName
|
||||||
}
|
}
|
||||||
updateStandInfo(params).then(res => {
|
updateStandInfo(params).then(res => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user