add:新增功能提交;
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
"author": "Zheng Jie",
|
||||
"license": "Apache-2.0",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"dev1": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
|
||||
"dev": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
|
||||
"build": "set NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service build",
|
||||
"build:prod": "vue-cli-service build",
|
||||
"build:stage": "vue-cli-service build --mode staging",
|
||||
"preview": "node build/index.js --preview",
|
||||
|
||||
@@ -95,5 +95,13 @@ export function reload() {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, finish, cancel, createTaskByClick, deviceAskTask, ordinaryTaskCreate, specialTaskCreate, createInst, reload }
|
||||
export function queryTaskSheet(data) {
|
||||
return request({
|
||||
url: 'api/task/queryTaskSheet',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, finish, cancel, createTaskByClick, deviceAskTask, ordinaryTaskCreate, specialTaskCreate, createInst, reload, queryTaskSheet }
|
||||
|
||||
|
||||
@@ -27,15 +27,15 @@ export default {
|
||||
'baseApi'
|
||||
])
|
||||
},
|
||||
async created() {
|
||||
const res1 = await apiTrack.trackEdit()
|
||||
this.configInfo = [...res1.content][0]
|
||||
const res2 = await apiTrack.carEdit()
|
||||
this.carData = [...res2.content]
|
||||
this.deviceData = this.carData.map(e => { return { device_code: e.device_code } })
|
||||
this._queryDevice(this.deviceData)
|
||||
this.timerFun(this._queryDevice, this.configInfo.refresh_time * 1000)()
|
||||
},
|
||||
// async created() {
|
||||
// const res1 = await apiTrack.trackEdit()
|
||||
// this.configInfo = [...res1.content][0]
|
||||
// const res2 = await apiTrack.carEdit()
|
||||
// this.carData = [...res2.content]
|
||||
// this.deviceData = this.carData.map(e => { return { device_code: e.device_code } })
|
||||
// this._queryDevice(this.deviceData)
|
||||
// this.timerFun(this._queryDevice, this.configInfo.refresh_time * 1000)()
|
||||
// },
|
||||
methods: {
|
||||
timerFun(f, time) {
|
||||
const _this = this
|
||||
|
||||
@@ -154,7 +154,20 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="start_point_code" :label="$t('task.select.Start_point')" :min-width="flexWidth('start_point_code',crud.data,$t('task.select.Start_point'))" />
|
||||
<el-table-column prop="next_point_code" :label="$t('task.select.Destination')" :min-width="flexWidth('next_point_code',crud.data,$t('task.select.Destination'))" />
|
||||
<el-table-column prop="matarial" :label="$t('TaskRecord.table.Material')" :min-width="flexWidth('matarial',crud.data,$t('TaskRecord.table.Material'))" />
|
||||
<el-table-column prop="instruction_type" :label="$t('Inst.table.instruction_type')" :min-width="flexWidth('instruction_type',crud.data,$t('Inst.table.instruction_type'))">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.task_type[scope.row.instruction_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="priority" label="优先级" />
|
||||
<el-table-column prop="car_type" :label="$t('车型')">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.car_type === '1'">PS20</span>
|
||||
<span v-if="scope.row.car_type === '2'">RT16</span>
|
||||
<span v-if="scope.row.car_type === '3'">通用</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="carno" :label="$t('Inst.table.carno')" :min-width="flexWidth('carno',crud.data,$t('Inst.table.carno'))" />
|
||||
<el-table-column prop="quantity" :label="$t('TaskRecord.table.Quantity')" :min-width="flexWidth('quantity',crud.data,$t('TaskRecord.table.Quantity'))" />
|
||||
<el-table-column prop="remark" :label="$t('task.select.Remark')" :min-width="flexWidth('remark',crud.data,$t('task.select.Remark'))" />
|
||||
<el-table-column prop="create_by" :label="$t('task.select.Creator')" :min-width="flexWidth('create_by',crud.data,$t('task.select.Creator'))" />
|
||||
|
||||
@@ -32,20 +32,31 @@
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('task.txt_box.Material_type')">
|
||||
<el-select
|
||||
v-model="query.material_type"
|
||||
clearable
|
||||
filterable
|
||||
<el-form-item :label="$t('车号')">
|
||||
<el-input
|
||||
v-model="query.car_no"
|
||||
size="small"
|
||||
:placeholder="$t('task.txt_box.Material_type')"
|
||||
clearable
|
||||
:placeholder="$t('车号')"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
style="width: 190px"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option v-for="item in materialList" :key="item.id" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item :label="$t('task.txt_box.Material_type')">-->
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="query.material_type"-->
|
||||
<!-- clearable-->
|
||||
<!-- filterable-->
|
||||
<!-- size="small"-->
|
||||
<!-- :placeholder="$t('task.txt_box.Material_type')"-->
|
||||
<!-- class="filter-item"-->
|
||||
<!-- style="width: 190px"-->
|
||||
<!-- @change="crud.toQuery"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option v-for="item in materialList" :key="item.id" :label="item.label" :value="item.value" />-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item :label="$t('task.txt_box.Task_status')">
|
||||
<el-select
|
||||
v-model="query.status"
|
||||
@@ -276,7 +287,7 @@
|
||||
>
|
||||
<el-table-column v-if="false" prop="task_id" label="任务标识" />
|
||||
<el-table-column prop="task_code" :label="$t('task.txt_box.Task_code')" :min-width="flexWidth('task_code',crud.data,$t('task.txt_box.Task_code'))" />
|
||||
<el-table-column prop="vehicle_code" :label="$t('task.txt_box.Vehicle_number')" />
|
||||
<el-table-column prop="vehicle_code" :label="$t('task.txt_box.Vehicle_number')" width="120" />
|
||||
<el-table-column prop="task_type" :label="$t('task.txt_box.Task_type')" width="100px">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.task_type[scope.row.task_type] }}
|
||||
@@ -293,6 +304,19 @@
|
||||
<el-table-column prop="priority" :label="$t('TaskRecord.table.Priority')" :min-width="flexWidth('priority',crud.data,$t('TaskRecord.table.Priority'))" />
|
||||
<el-table-column prop="start_point_code" :label="$t('task.select.Start_point')" :min-width="flexWidth('start_point_code',crud.data,$t('task.select.Start_point'))" />
|
||||
<el-table-column prop="next_point_code" :label="$t('task.select.Destination')" :min-width="flexWidth('next_point_code',crud.data,$t('task.select.Destination'))" />
|
||||
<el-table-column prop="car_type" :label="$t('车型')">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.car_type === '1'">PS20</span>
|
||||
<span v-if="scope.row.car_type === '2'">RT16</span>
|
||||
<span v-if="scope.row.car_type === '3'">通用</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="car_no" :label="$t('车号')" />
|
||||
<el-table-column prop="create_time" :label="$t('task.select.Create_time')" width="135" />
|
||||
<el-table-column prop="update_time" :label="$t('TaskRecord.table.Update_time')" :min-width="flexWidth('update_time',crud.data,$t('task.select.Update_time'))" />
|
||||
<el-table-column prop="to_x" :label="$t('车辆运行开始时间')" width="135" />
|
||||
<el-table-column prop="to_y" :label="$t('车辆运行结束时间')" width="135" />
|
||||
<el-table-column prop="to_z" :label="$t('车辆运行时长(分钟)')" width="135" />
|
||||
<el-table-column prop="start_point_code2" :label="$t('TaskRecord.table.Starting_point_two')" :min-width="flexWidth('start_point_code2',crud.data,$t('TaskRecord.table.Starting_point_two'))" />
|
||||
<el-table-column prop="next_point_code2" :label="$t('TaskRecord.table.Endpoint_two')" :min-width="flexWidth('next_point_code2',crud.data,$t('TaskRecord.table.Endpoint_two'))" />
|
||||
<el-table-column prop="interaction_json" :label="$t('task.select.Interaction_json')" :show-overflow-tooltip="true" width="150px" />
|
||||
@@ -300,9 +324,7 @@
|
||||
<el-table-column prop="quantity" :label="$t('TaskRecord.table.Quantity')" />
|
||||
<el-table-column prop="remark" :label="$t('task.select.Remark')" />
|
||||
<el-table-column prop="create_by" :label="$t('task.select.Creator')" />
|
||||
<el-table-column prop="create_time" :label="$t('task.select.Create_time')" width="135" />
|
||||
<el-table-column prop="update_by" :label="$t('TaskRecord.table.Update_by')" :min-width="flexWidth('update_by',crud.data,$t('TaskRecord.table.Update_by'))" />
|
||||
<el-table-column prop="update_time" :label="$t('TaskRecord.table.Update_time')" :min-width="flexWidth('update_time',crud.data,$t('task.select.Update_time'))" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
@@ -462,7 +484,6 @@ export default {
|
||||
getDicts().then(data => {
|
||||
this.dicts = data
|
||||
})
|
||||
this.query.a = 111
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
@@ -487,14 +508,26 @@ export default {
|
||||
},
|
||||
doExportTaskLogging() {
|
||||
this.downLoadTaskLogging = true
|
||||
const timeRange = this.crud.query.createTime
|
||||
// 校验:必须是一个包含两个元素的数组
|
||||
if (!Array.isArray(timeRange) || timeRange.length !== 2 || !timeRange[0] || !timeRange[1]) {
|
||||
this.crud.notify('请选择开始时间与结束时间', CRUD.NOTIFICATION_TYPE.WARNING);
|
||||
this.downLoadTaskLogging = false
|
||||
return
|
||||
}
|
||||
const formatDateTime = (isoStr) => {
|
||||
const d = new Date(isoStr)
|
||||
const pad = (n) => String(n).padStart(2, '0')
|
||||
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}`
|
||||
}
|
||||
const params = {
|
||||
task_code: this.query.task_code,
|
||||
vehicle_code: this.query.vehicle_code,
|
||||
material_type: this.query.material_type,
|
||||
status: this.query.status,
|
||||
point_code: this.crud.pointCode,
|
||||
createTime: this.crud.createTime,
|
||||
end_time: this.crud.endTime // 假设 this.crud.endTime 是你的结束时间
|
||||
task_code: this.crud.query.task_code,
|
||||
vehicle_code: this.crud.query.vehicle_code,
|
||||
material_type: this.crud.query.material_type,
|
||||
status: this.crud.query.status,
|
||||
point_code: this.crud.query.point_code,
|
||||
createTime: formatDateTime(timeRange[0]),
|
||||
end_time: formatDateTime(timeRange[1])
|
||||
}
|
||||
const url = 'api/task/downloadTaskLogging'
|
||||
download(url, params).then(result => {
|
||||
|
||||
266
acs/nladmin-ui/src/views/acs/history/taskSheet/index.vue
Normal file
266
acs/nladmin-ui/src/views/acs/history/taskSheet/index.vue
Normal file
@@ -0,0 +1,266 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="head-container">
|
||||
<el-form :inline="true" class="demo-form-inline">
|
||||
<el-form-item label="时间范围">
|
||||
<el-date-picker
|
||||
v-model="query.dateRange"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="fetchData">查询</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="success" icon="el-icon-download" size="small" @click="exportAll">导出Excel</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<!-- 入库统计 -->
|
||||
<div class="table-section">
|
||||
<div class="table-title">入库统计</div>
|
||||
<el-table
|
||||
:data="inboundData"
|
||||
border
|
||||
style="width: 100%"
|
||||
:header-cell-style="headerCellStyle"
|
||||
:cell-style="cellStyle"
|
||||
:span-method="inboundSpanMethod"
|
||||
>
|
||||
<el-table-column prop="startPoint" label="起点" align="center" />
|
||||
<el-table-column prop="endPoint" label="终点" align="center" />
|
||||
<el-table-column prop="item1" label="1-3分钟" align="center" />
|
||||
<el-table-column prop="item2" label="3-5分钟" align="center" />
|
||||
<el-table-column prop="item3" label="5-8分钟" align="center" />
|
||||
<el-table-column prop="item4" label="8分钟以上" align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<!-- 出库统计 -->
|
||||
<div class="table-section">
|
||||
<div class="table-title">出库统计</div>
|
||||
<el-table
|
||||
:data="outboundData"
|
||||
border
|
||||
style="width: 100%"
|
||||
:header-cell-style="headerCellStyle"
|
||||
:cell-style="cellStyle"
|
||||
:span-method="outboundSpanMethod"
|
||||
>
|
||||
<el-table-column prop="startPoint" label="起点" align="center" />
|
||||
<el-table-column prop="endPoint" label="终点" align="center" />
|
||||
<el-table-column prop="item1" label="1-3分钟" align="center" />
|
||||
<el-table-column prop="item2" label="3-5分钟" align="center" />
|
||||
<el-table-column prop="item3" label="5-8分钟" align="center" />
|
||||
<el-table-column prop="item4" label="8分钟以上" align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { queryTaskSheet } from '@/api/acs/task/task'
|
||||
import XLSX from 'xlsx'
|
||||
|
||||
export default {
|
||||
name: 'TaskSheet',
|
||||
data() {
|
||||
return {
|
||||
query: {
|
||||
dateRange: []
|
||||
},
|
||||
// 入库数据
|
||||
inboundData: [
|
||||
{ startPoint: 'AA/缓存区', endPoint: 'AB', item1: '', item2: '', item3: '', item4: '' },
|
||||
{ startPoint: 'AA/缓存区', endPoint: 'AD', item1: '', item2: '', item3: '', item4: '' },
|
||||
{ startPoint: 'AA/缓存区', endPoint: 'AC', item1: '', item2: '', item3: '', item4: '' }
|
||||
],
|
||||
// 出库数据
|
||||
outboundData: [
|
||||
{ startPoint: 'AB', endPoint: 'AA/缓存区', item1: '', item2: '', item3: '', item4: '' },
|
||||
{ startPoint: 'AD', endPoint: 'AA/缓存区', item1: '', item2: '', item3: '', item4: '' },
|
||||
{ startPoint: 'AC', endPoint: 'AA/缓存区', item1: '', item2: '', item3: '', item4: '' }
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
const params = {}
|
||||
if (this.query.dateRange && this.query.dateRange.length === 2) {
|
||||
params.startDate = this.query.dateRange[0]
|
||||
params.endDate = this.query.dateRange[1]
|
||||
}
|
||||
queryTaskSheet(params).then(res => {
|
||||
if (res) {
|
||||
this.fillData(res)
|
||||
}
|
||||
})
|
||||
},
|
||||
fillData(data) {
|
||||
// 入库数据填充 (item1-item12)
|
||||
for (let i = 0; i < 3; i++) {
|
||||
const baseIndex = i * 4
|
||||
this.inboundData[i].item1 = data[0][`item${baseIndex + 1}`] ? data[0][`item${baseIndex + 1}`] + '%' : '0%'
|
||||
this.inboundData[i].item2 = data[0][`item${baseIndex + 2}`] ? data[0][`item${baseIndex + 2}`] + '%' : '0%'
|
||||
this.inboundData[i].item3 = data[0][`item${baseIndex + 3}`] ? data[0][`item${baseIndex + 3}`] + '%' : '0%'
|
||||
this.inboundData[i].item4 = data[0][`item${baseIndex + 4}`] ? data[0][`item${baseIndex + 4}`] + '%' : '0%'
|
||||
}
|
||||
// 出库数据填充 (item13-item24)
|
||||
for (let i = 0; i < 3; i++) {
|
||||
const baseIndex = 12 + i * 4
|
||||
this.outboundData[i].item1 = data[0][`item${baseIndex + 1}`] ? data[0][`item${baseIndex + 1}`] + '%' : '0%'
|
||||
this.outboundData[i].item2 = data[0][`item${baseIndex + 2}`] ? data[0][`item${baseIndex + 2}`] + '%' : '0%'
|
||||
this.outboundData[i].item3 = data[0][`item${baseIndex + 3}`] ? data[0][`item${baseIndex + 3}`] + '%' : '0%'
|
||||
this.outboundData[i].item4 = data[0][`item${baseIndex + 4}`] ? data[0][`item${baseIndex + 4}`] + '%' : '0%'
|
||||
}
|
||||
},
|
||||
// 导出所有表格
|
||||
exportAll() {
|
||||
const workbook = XLSX.utils.book_new()
|
||||
|
||||
// 准备Excel数据,将两个表格数据合并到一个工作表
|
||||
const header = ['起点', '终点', '1-3分钟', '3-5分钟', '5-8分钟', '8分钟以上']
|
||||
const data = []
|
||||
|
||||
// 添加入库统计数据
|
||||
data.push(['入库统计']) // 添加入库统计标题
|
||||
data.push(header) // 添加表头
|
||||
this.inboundData.forEach(item => {
|
||||
data.push([
|
||||
item.startPoint,
|
||||
item.endPoint,
|
||||
item.item1,
|
||||
item.item2,
|
||||
item.item3,
|
||||
item.item4
|
||||
])
|
||||
})
|
||||
data.push([]) // 空行分隔
|
||||
|
||||
// 添加出库统计数据
|
||||
data.push(['出库统计']) // 添加出库统计标题
|
||||
data.push(header) // 添加表头
|
||||
this.outboundData.forEach(item => {
|
||||
data.push([
|
||||
item.startPoint,
|
||||
item.endPoint,
|
||||
item.item1,
|
||||
item.item2,
|
||||
item.item3,
|
||||
item.item4
|
||||
])
|
||||
})
|
||||
|
||||
const worksheet = XLSX.utils.aoa_to_sheet(data)
|
||||
|
||||
// 设置列宽
|
||||
worksheet['!cols'] = [
|
||||
{ wch: 15 },
|
||||
{ wch: 15 },
|
||||
{ wch: 12 },
|
||||
{ wch: 12 },
|
||||
{ wch: 12 },
|
||||
{ wch: 15 }
|
||||
]
|
||||
|
||||
// 设置样式
|
||||
if (worksheet && worksheet['!ref']) {
|
||||
const range = XLSX.utils.decode_range(worksheet['!ref'])
|
||||
for (let R = range.s.r; R <= range.e.r; ++R) {
|
||||
for (let C = range.s.c; C <= range.e.c; ++C) {
|
||||
const cellAddress = XLSX.utils.encode_cell({ r: R, c: C })
|
||||
if (!worksheet[cellAddress]) continue
|
||||
|
||||
// 设置"入库统计"和"出库统计"标题样式(第1行和第6行)
|
||||
if (R === 0 || R === 5) {
|
||||
worksheet[cellAddress].s = {
|
||||
fill: { fgColor: { rgb: "FFFFFF" } },
|
||||
font: { bold: true, sz: 14 },
|
||||
alignment: { horizontal: "center", vertical: "center" }
|
||||
}
|
||||
}
|
||||
// 设置表头样式(第2行和第7行)
|
||||
else if (R === 1 || R === 6) {
|
||||
worksheet[cellAddress].s = {
|
||||
fill: { fgColor: { rgb: "F5F7FA" } },
|
||||
font: { bold: true },
|
||||
alignment: { horizontal: "center", vertical: "center" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 添加工作表到工作簿
|
||||
XLSX.utils.book_append_sheet(workbook, worksheet, 'Sheet1')
|
||||
|
||||
// 生成文件名
|
||||
let filename = '任务统计'
|
||||
if (this.query.dateRange && this.query.dateRange.length === 2) {
|
||||
filename = `${filename}_${this.query.dateRange[0]}至${this.query.dateRange[1]}`
|
||||
}
|
||||
filename += '.xlsx'
|
||||
|
||||
XLSX.writeFile(workbook, filename)
|
||||
},
|
||||
// 入库表格合并方法 - 合并起点列
|
||||
inboundSpanMethod({ rowIndex, columnIndex }) {
|
||||
if (columnIndex === 0) {
|
||||
// 起点列,第一行合并3行
|
||||
if (rowIndex === 0) {
|
||||
return { rowspan: 3, colspan: 1 }
|
||||
} else {
|
||||
return { rowspan: 0, colspan: 0 }
|
||||
}
|
||||
}
|
||||
},
|
||||
// 出库表格合并方法 - 合并终点列
|
||||
outboundSpanMethod({ rowIndex, columnIndex }) {
|
||||
if (columnIndex === 1) {
|
||||
// 终点列,第一行合并3行
|
||||
if (rowIndex === 0) {
|
||||
return { rowspan: 3, colspan: 1 }
|
||||
} else {
|
||||
return { rowspan: 0, colspan: 0 }
|
||||
}
|
||||
}
|
||||
},
|
||||
cellStyle({ columnIndex }) {
|
||||
if (columnIndex >= 2) {
|
||||
return { fontWeight: 'bold' }
|
||||
}
|
||||
return {}
|
||||
},
|
||||
headerCellStyle({ columnIndex }) {
|
||||
// 时间列头背景色: 5-8分钟黄色, 8分钟以上红色
|
||||
if (columnIndex === 4) {
|
||||
return { backgroundColor: '#ffff00', color: '#000' }
|
||||
} else if (columnIndex === 5) {
|
||||
return { backgroundColor: '#f46262', color: '#000' }
|
||||
}
|
||||
return { backgroundColor: '#f5f7fa', color: '#000' }
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.table-section {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.table-title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
@@ -85,6 +85,17 @@
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('优先级')">
|
||||
<el-input
|
||||
v-model="query.priority"
|
||||
size="small"
|
||||
clearable
|
||||
:placeholder="$t('输入优先级')"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -141,21 +152,6 @@
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column v-if="false" prop="instruction_id" label="指令标识" />
|
||||
<el-table-column prop="instruction_code" :label="$t('Inst.table.instruction_code')" :min-width="flexWidth('instruction_code',crud.data,$t('Inst.table.instruction_code'))" />
|
||||
<el-table-column prop="instruction_type" :label="$t('Inst.table.instruction_type')" :min-width="flexWidth('instruction_type',crud.data,$t('Inst.table.instruction_type'))">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.task_type[scope.row.instruction_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="agv_action_type" :label="$t('task.txt_box.Action_type')" :min-width="flexWidth('agv_action_type',crud.data,$t('task.txt_box.Action_type'))">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.agv_action_type===1 ">{{ $t('task.txt_box.ORDINARY') }}</span>
|
||||
<span v-if="scope.row.agv_action_type===2 ">{{ $t('task.txt_box.IN_STOCK') }}</span>
|
||||
<span v-if="scope.row.agv_action_type===3 ">{{ $t('task.txt_box.OUT_STOCK') }}</span>
|
||||
<span v-if="scope.row.agv_action_type===4 ">{{ $t('task.txt_box.IN_OUT_STOCK') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="put_point_code" :label="$t('Inst.table.put_point_code')" :min-width="flexWidth('put_point_code',crud.data,$t('Inst.table.put_point_code'))" />
|
||||
<el-table-column prop="execute_device_code" :label="$t('Inst.table.execute_device_code')" :min-width="flexWidth('execute_device_code',crud.data,$t('Inst.table.execute_device_code'))" />
|
||||
<!-- <el-table-column prop="link_num" label="关联编号" />-->
|
||||
<el-table-column prop="task_code" :label="$t('Inst.table.task_code')" :min-width="flexWidth('task_code',crud.data,$t('Inst.table.task_code'))" />
|
||||
<el-table-column prop="vehicle_code" :label="$t('Inst.table.vehicle_code')" :min-width="flexWidth('vehicle_code',crud.data,$t('Inst.table.vehicle_code'))" />
|
||||
@@ -175,16 +171,37 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="start_point_code" :label="$t('Inst.table.start_point_code')" :min-width="flexWidth('start_point_code',crud.data,$t('Inst.table.start_point_code'))" />
|
||||
<el-table-column prop="next_point_code" :label="$t('Inst.table.next_point_code')" :min-width="flexWidth('next_point_code',crud.data,$t('Inst.table.next_point_code'))" />
|
||||
<el-table-column prop="execute_device_code" :label="$t('Inst.table.execute_device_code')" :min-width="flexWidth('execute_device_code',crud.data,$t('Inst.table.execute_device_code'))" />
|
||||
<el-table-column prop="priority" label="优先级" />
|
||||
<el-table-column prop="create_time" :label="$t('Inst.table.create_time')" :min-width="flexWidth('create_time',crud.data,$t('Inst.table.create_time'))" />
|
||||
<el-table-column prop="update_time" :label="$t('Inst.table.update_time')" :min-width="flexWidth('update_time',crud.data,$t('Inst.table.update_time'))" />
|
||||
<el-table-column prop="instruction_type" :label="$t('Inst.table.instruction_type')" :min-width="flexWidth('instruction_type',crud.data,$t('Inst.table.instruction_type'))">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.task_type[scope.row.instruction_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="car_type" :label="$t('车型')">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.car_type === '1'">PS20</span>
|
||||
<span v-if="scope.row.car_type === '2'">RT16</span>
|
||||
<span v-if="scope.row.car_type === '3'">通用</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="carno" :label="$t('Inst.table.carno')" :min-width="flexWidth('carno',crud.data,$t('Inst.table.carno'))" />
|
||||
<el-table-column prop="agv_action_type" :label="$t('task.txt_box.Action_type')" :min-width="flexWidth('agv_action_type',crud.data,$t('task.txt_box.Action_type'))">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.agv_action_type===1 ">{{ $t('task.txt_box.ORDINARY') }}</span>
|
||||
<span v-if="scope.row.agv_action_type===2 ">{{ $t('task.txt_box.IN_STOCK') }}</span>
|
||||
<span v-if="scope.row.agv_action_type===3 ">{{ $t('task.txt_box.OUT_STOCK') }}</span>
|
||||
<span v-if="scope.row.agv_action_type===4 ">{{ $t('task.txt_box.IN_OUT_STOCK') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="start_point_code2" :label="$t('Inst.table.start_point_code2')" :min-width="flexWidth('start_point_code2',crud.data,$t('Inst.table.start_point_code2'))" />
|
||||
<el-table-column prop="next_point_code2" :label="$t('Inst.table.next_point_code2')" :min-width="flexWidth('next_point_code2',crud.data,$t('Inst.table.next_point_code2'))" />
|
||||
<el-table-column prop="put_point_code" :label="$t('Inst.table.put_point_code')" :min-width="flexWidth('put_point_code',crud.data,$t('Inst.table.put_point_code'))" />
|
||||
<el-table-column prop="execute_device_code" :label="$t('Inst.table.execute_device_code')" :min-width="flexWidth('execute_device_code',crud.data,$t('Inst.table.execute_device_code'))" />
|
||||
<el-table-column prop="carno" :label="$t('Inst.table.carno')" :min-width="flexWidth('carno',crud.data,$t('Inst.table.carno'))" />
|
||||
<el-table-column prop="remark" :label="$t('Inst.table.remark')" :min-width="flexWidth('remark',crud.data,$t('Inst.table.remark'))" />
|
||||
<el-table-column prop="create_by" :label="$t('Inst.table.create_by')" :min-width="flexWidth('create_by',crud.data,$t('Inst.table.create_by'))" />
|
||||
<el-table-column prop="create_time" :label="$t('Inst.table.create_time')" :min-width="flexWidth('create_time',crud.data,$t('Inst.table.create_time'))" />
|
||||
<el-table-column prop="update_by" :label="$t('Inst.table.update_by')" :min-width="flexWidth('update_by',crud.data,$t('Inst.table.update_by'))" />
|
||||
<el-table-column prop="update_time" :label="$t('Inst.table.update_time')" :min-width="flexWidth('update_time',crud.data,$t('Inst.table.update_time'))" />
|
||||
<el-table-column
|
||||
v-permission="['admin','instruction:edit','instruction:del']"
|
||||
:label="$t('auto.common.Operate')"
|
||||
|
||||
@@ -84,6 +84,17 @@
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('优先级')">
|
||||
<el-input
|
||||
v-model="query.priority"
|
||||
size="small"
|
||||
clearable
|
||||
:placeholder="$t('输入优先级')"
|
||||
style="width: 200px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
@@ -542,16 +553,9 @@
|
||||
{{ dict.label.task_type[scope.row.task_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="agv_action_type" :label="$t('task.txt_box.Action_type')" :min-width="flexWidth('agv_action_type',crud.data,$t('task.txt_box.Action_type'))">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.agv_action_type===1 ">{{ $t('task.txt_box.ORDINARY') }}</span>
|
||||
<span v-if="scope.row.agv_action_type===2 ">{{ $t('task.txt_box.IN_STOCK') }}</span>
|
||||
<span v-if="scope.row.agv_action_type===3 ">{{ $t('task.txt_box.OUT_STOCK') }}</span>
|
||||
<span v-if="scope.row.agv_action_type===4 ">{{ $t('task.txt_box.IN_OUT_STOCK') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="vehicle_code" :label="$t('task.txt_box.Vehicle_number')" :min-width="flexWidth('vehicle_code',crud.data,$t('task.txt_box.Vehicle_number'))" />
|
||||
<el-table-column prop="start_point_code" :label="$t('task.select.Pickup_point')" :min-width="flexWidth('start_point_code',crud.data,$t('task.select.Pickup_point'))" />
|
||||
<el-table-column prop="next_point_code" :label="$t('task.select.Delivery_point')" :min-width="flexWidth('next_point_code',crud.data,$t('task.select.Delivery_point'))" />
|
||||
<el-table-column prop="task_status" :label="$t('task.txt_box.Task_status')" width="150px">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.task_status==='0' ">{{ $t('task.select.Ready') }}</span>
|
||||
@@ -560,11 +564,27 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="priority" :label="$t('task.txt_box.Priority')" :min-width="flexWidth('priority',crud.data,$t('task.txt_box.Priority'))" />
|
||||
<el-table-column prop="start_point_code" :label="$t('task.select.Pickup_point')" :min-width="flexWidth('start_point_code',crud.data,$t('task.select.Pickup_point'))" />
|
||||
<el-table-column prop="next_point_code" :label="$t('task.select.Delivery_point')" :min-width="flexWidth('next_point_code',crud.data,$t('task.select.Delivery_point'))" />
|
||||
<el-table-column prop="create_time" :label="$t('task.select.Create_time')" :min-width="flexWidth('create_time',crud.data,$t('task.select.Create_time'))" />
|
||||
<el-table-column prop="update_time" :label="$t('修改时间')" :min-width="flexWidth('update_time',crud.data,$t('task.select.Update_time'))" />
|
||||
<el-table-column prop="car_type" :label="$t('车型')">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.car_type === '1'">PS20</span>
|
||||
<span v-if="scope.row.car_type === '2'">RT16</span>
|
||||
<span v-if="scope.row.car_type === '3'">通用</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="car_no" :label="$t('车号')" />
|
||||
<el-table-column prop="start_point_code2" :label="$t('task.select.Start_point2')" :min-width="flexWidth('start_point_code2',crud.data,$t('task.select.Start_point2'))" />
|
||||
<el-table-column prop="next_point_code2" :label="$t('task.select.Destination2')" :min-width="flexWidth('next_point_code2',crud.data,$t('task.select.Destination2'))" />
|
||||
<el-table-column prop="interaction_json" :label="$t('task.select.Interaction_json')" show-overflow-tooltip="true" width="150px" />
|
||||
<el-table-column prop="agv_action_type" :label="$t('task.txt_box.Action_type')" :min-width="flexWidth('agv_action_type',crud.data,$t('task.txt_box.Action_type'))">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.agv_action_type===1 ">{{ $t('task.txt_box.ORDINARY') }}</span>
|
||||
<span v-if="scope.row.agv_action_type===2 ">{{ $t('task.txt_box.IN_STOCK') }}</span>
|
||||
<span v-if="scope.row.agv_action_type===3 ">{{ $t('task.txt_box.OUT_STOCK') }}</span>
|
||||
<span v-if="scope.row.agv_action_type===4 ">{{ $t('task.txt_box.IN_OUT_STOCK') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="agv_system_type" :label="$t('task.txt_box.AGV_system')" show-overflow-tooltip="true" width="150px">
|
||||
<template slot-scope="scope">
|
||||
{{ getAgvSystemLabel(scope.row.agv_system_type) }}
|
||||
@@ -573,7 +593,6 @@
|
||||
<el-table-column prop="put_point_code" :label="$t('TaskRecord.table.Transit_point')" :min-width="flexWidth('put_point_code',crud.data,$t('TaskRecord.table.Transit_point'))" />
|
||||
<el-table-column prop="remark" :label="$t('task.select.Remark')" :min-width="flexWidth('remark',crud.data,$t('task.select.Remark'))" />
|
||||
<el-table-column prop="create_by" :label="$t('task.select.Creator')" :min-width="flexWidth('create_by',crud.data,$t('task.select.Creator'))" />
|
||||
<el-table-column prop="create_time" :label="$t('task.select.Create_time')" :min-width="flexWidth('create_time',crud.data,$t('task.select.Create_time'))" />
|
||||
<el-table-column v-permission="['admin','task:edit','task:del']" :label="$t('task.select.Operation')" width="200px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-dropdown>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<script>
|
||||
import { header } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import Date from '@/utils/datetime'
|
||||
|
||||
export default {
|
||||
components: { rrOperation },
|
||||
@@ -33,8 +34,7 @@ export default {
|
||||
const end = new Date()
|
||||
const start = new Date()
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7)
|
||||
picker.$emit('pick', [start, end])
|
||||
}
|
||||
picker.$emit('pick', [start, end])}
|
||||
}, {
|
||||
text: '最近一个月',
|
||||
onClick(picker) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-weight: bold;color: #666;font-size: 15px">AGV运行轨迹图</span>
|
||||
<!-- <span style="font-weight: bold;color: #666;font-size: 15px">AGV运行轨迹图</span>-->
|
||||
</div>
|
||||
<div>
|
||||
<showTrack />
|
||||
|
||||
Reference in New Issue
Block a user