yejian 3 лет назад
Родитель
Сommit
6ea7d1d081

+ 40 - 0
imcs-ui/src/api/agv/agv.js

@@ -0,0 +1,40 @@
+/*********************** 【agv交互】API ********************/
+import axiosApi from '../AxiosApi.js'
+
+const  apiList = {
+  getList:{
+    method: 'POST',
+    url: `/authority/agv/agvCallbackService/getList`
+  },
+  page:{
+    method: 'POST',
+    url: `/authority/agv/agvCallbackService/page`
+  },
+  list:{
+    method: `POST`,
+    url: `authority/agv/agvCallbackService/query`
+  }
+}
+
+export  default {
+  getList(data){
+    return axiosApi({
+      ...apiList.getList,
+      data
+    })
+  },
+  page(data){
+    return axiosApi({
+      ...apiList.page,
+      data
+    })
+  },
+
+  list (data) {
+    return axiosApi({
+      ...apiList.list,
+      data
+    })
+  }
+}
+

+ 43 - 0
imcs-ui/src/lang/zh/agv.js

@@ -0,0 +1,43 @@
+/**************** 【生产准备中心】菜单  **************/
+export default {
+	agv: {
+		// 本模型下的共通
+		common: {
+		},
+		// 列表搜索表单名称
+		searchForm: {
+			orderName: '订单名称',
+      orderNo: '订单编号',
+			partName: '零件名称',
+			partNo: '零件编号',
+      createTime: '生成时间',
+		},
+		// 按钮的名称
+    buttons: {
+    },
+    // 列表的cell名称
+		table: {
+			// 【工具原材料管理】列表table字段名称
+			agv: {
+        orderName: '订单名称',
+        orderNo: '订单编号',
+        partName: '零件名称',
+        partNo: '零件编号',
+        procedureNo: '工序',
+        start: '起点',
+        goal: '终点',
+        createTime: '下发时间',
+        completeTime: '完成时间',
+			}
+		},
+		// 表单数据名称
+		form: {
+		},
+		// 表单验证规则提示信息
+		rules: {
+		},
+		// 提示或者显示信息
+		tips:{
+		}
+	}
+}

+ 2 - 0
imcs-ui/src/lang/zh/zh.js

@@ -32,6 +32,7 @@ import zhStatisticalAnalysis from './statisticalAnalysis'
 import zhCuttingTool from './cuttingTool'
 // 【刀具申请】
 import zhCuttingToolApply from './cuttingToolApply'
+import zhAgv from './agv'
 
 export default {
 	/********* 分类整理多语言文件(start)  ********/
@@ -52,6 +53,7 @@ export default {
   ...zhStatisticalAnalysis,
   ...zhCuttingTool,
   ...zhCuttingToolApply,
+  ...zhAgv,
 	/********* 分类整理多语言文件(end)  ********/
   	route: {
     	dashboard: '系统主页',

+ 277 - 0
imcs-ui/src/views/zuihou/agvMgr/workRecord/Index.vue

@@ -0,0 +1,277 @@
+<template>
+  <div class="app-container">
+    <!-- 搜索模块 -->
+    <div class="filter-container">
+      <!--订单名称-->
+      <span>
+        <span>{{ $t("agv.searchForm.orderName") }}:</span>
+        <el-input
+          v-model="queryParams.model.orderName"
+          :placeholder='$t("common.pleaseEnter")'
+          style="width: 150px;"
+          size="medium"
+        />
+      </span>
+      <!--订单编号-->
+      <span>
+        <span>{{ $t("agv.searchForm.orderNo") }}:</span>
+        <el-input
+          v-model="queryParams.model.orderNo"
+          :placeholder='$t("common.pleaseEnter")'
+          style="width: 150px;"
+          size="medium"
+        />
+      </span>
+      <!--零件名称-->
+      <span>
+        <span>{{ $t("agv.searchForm.partName") }}:</span>
+        <el-input
+          v-model="queryParams.model.partName"
+          :placeholder='$t("common.pleaseEnter")'
+          style="width: 150px;"
+          size="medium"
+        />
+      </span>
+      <!--零件编号-->
+      <span>
+        <span>{{ $t("agv.searchForm.partNo") }}:</span>
+        <el-input
+          v-model="queryParams.model.partNo"
+          :placeholder='$t("common.pleaseEnter")'
+          style="width: 150px;"
+          size="medium"
+        />
+      </span>
+      <br>
+      <!--生成日期-->
+      <span>
+        <span>{{ $t("agv.searchForm.createTime") }}:</span>
+        <el-date-picker
+          v-model="queryParams.model.createTime"
+          type="datetime"
+          format="yyyy-MM-dd"
+          value-format="yyyy-MM-dd"
+          style="width: 20%;"
+        />
+    	</span>
+      <span style="margin-left: 15px;">
+        <el-button
+          plain
+          type="primary"
+          icon="el-icon-search"
+          size="medium"
+          @click="search"
+        >
+          {{ $t("table.search") }}
+        </el-button>
+        <el-button
+          plain
+          type="warning"
+          icon="el-icon-refresh"
+          size="medium"
+          @click="reset"
+        >
+          {{ $t("table.reset") }}
+        </el-button>
+      </span>
+    </div>
+    <!-- 列表数据 -->
+    <el-table
+      :key="tableKey"
+      ref="table"
+      v-loading="loading"
+      :data="tableData.records"
+      border
+      fit
+      row-key="id"
+      style="width: 100%;"
+      @selection-change="onSelectChange"
+      @cell-click="cellClick"
+    >
+      <el-table-column
+        :label='$t("common.serialNo")'
+        width="55px"
+        align="center"
+      >
+        <template slot-scope="scope">
+          <div>
+            {{ scope.$index+(queryParams.current - 1) * queryParams.size + 1 }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column
+        align="center"
+        type="selection"
+        width="50"
+        :reserve-selection="true"
+      />
+      <!--订单名称-->
+      <el-table-column
+        prop="orderName"
+        :label='$t("agv.table.agv.orderName")'
+      :show-overflow-tooltip="true"
+      />
+      <!--订单编号-->
+      <el-table-column
+        prop="orderNo"
+        :label='$t("agv.table.agv.orderNo")'
+        :show-overflow-tooltip="true"
+      />
+      <!--零件名称-->
+      <el-table-column
+        prop="partName"
+        :label='$t("agv.table.agv.partName")'
+        :show-overflow-tooltip="true"
+        width="120"
+      />
+      <!--零件编号-->
+      <el-table-column
+        prop="partNo"
+        :label='$t("agv.table.agv.partNo")'
+        :show-overflow-tooltip="true"
+        width="120"
+      />
+      <!--工序-->
+      <el-table-column
+        prop="procedureNo"
+        :label='$t("agv.table.agv.procedureNo")'
+        :show-overflow-tooltip="true"
+        width="120"
+      />
+      <!--起点-->
+      <el-table-column
+        prop="start"
+        :label='$t("agv.table.agv.start")'
+        :show-overflow-tooltip="true"
+        width="120"
+      />
+      <!--终点-->
+      <el-table-column
+        prop="goal"
+        :label='$t("agv.table.agv.goal")'
+        :show-overflow-tooltip="true"
+        width="120"
+      />
+      <!--下发时间-->
+      <el-table-column
+        prop="createTime"
+        :label='$t("agv.table.agv.createTime")'
+        width="180px"
+      />
+      <!--完成时间-->
+      <el-table-column
+        prop="completeTime"
+        :label='$t("agv.table.agv.completeTime")'
+        width="180px"
+      />
+    </el-table>
+    <pagination
+      v-show="tableData.total > 0"
+      :limit.sync="queryParams.size"
+      :page.sync="queryParams.current"
+      :total="Number(tableData.total)"
+      @pagination="fetch"
+    />
+  </div>
+</template>
+
+<script>
+  // 【分页】组件
+  import Pagination from "@/components/Pagination/index"
+  // 【维保计划管理】-API
+  import agvApi from "@/api/agv/agv"
+  // 共通函数
+  import {initQueryParams} from '@/utils/commons'
+
+  export default {
+    name: "Repair",
+    directives: {},
+    components: {Pagination},
+    props: {},
+    data() {
+      return {
+        tableKey: 0,
+        queryParams: initQueryParams({}),
+        selection: [],
+        loading: false,
+        tableData: {
+          total: 0
+        }
+      }
+    },
+    computed: {
+    },
+    // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
+    created() {
+      // 加载列表数据
+      this.fetch()
+    },
+    mounted() {
+    },
+    methods: {
+      onSelectChange(selection) {
+        this.selection = selection
+      },
+      search() {
+        this.fetch({
+          ...this.queryParams
+        })
+      },
+      reset() {
+        this.queryParams = initQueryParams({})
+        this.$refs.table.clearSort()
+        this.$refs.table.clearFilter()
+        this.search()
+      },
+      clearSelections() {
+        this.$refs.table.clearSelection()
+      },
+      fetch(params = {}) {
+        this.tableKey = !this.tableKey
+        this.selection = []
+        this.loading = true
+        if (this.queryParams.timeRange) {
+          this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
+          this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
+        }
+
+        this.queryParams.current = params.current ? params.current : this.queryParams.current
+        this.queryParams.size = params.size ? params.size : this.queryParams.size
+        agvApi.page(this.queryParams).then(response => {
+          const res = response.data
+          if (res.isSuccess) {
+            this.tableData = res.data
+          }
+          // eslint-disable-next-line no-return-assign
+        }).finally(() => this.loading = false)
+
+      },
+      cellClick(row, column) {
+        if (column['columnKey'] === "operation") {
+          return
+        }
+        let flag = false
+        this.selection.forEach((item) => {
+          if (item.id === row.id) {
+            flag = true
+            this.$refs.table.toggleRowSelection(row)
+          }
+        })
+
+        if (!flag) {
+          this.$refs.table.toggleRowSelection(row, true)
+        }
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .rowBtn {
+    margin: 0 5px;
+    color: #1890ff;
+  }
+
+  .rowBtn:hover {
+    opacity: 0.7;
+  }
+</style>