|
@@ -0,0 +1,145 @@
|
|
|
+<template>
|
|
|
+ <div class="mainContentBox">
|
|
|
+ <avue-crud
|
|
|
+ ref="crudRef"
|
|
|
+ v-model:search="search"
|
|
|
+ v-model="form"
|
|
|
+ :data="data"
|
|
|
+ :option="option"
|
|
|
+ v-model:page="page"
|
|
|
+ @row-save="createRow"
|
|
|
+ @row-update="updateRow"
|
|
|
+ @row-del="deleteRow"
|
|
|
+ @search-change="searchChange"
|
|
|
+ @search-reset="resetChange"
|
|
|
+ @size-change="dataList"
|
|
|
+ @current-change="dataList"
|
|
|
+ @selection-change="selectionChange"
|
|
|
+ >
|
|
|
+ <template #menu-left="{ size }">
|
|
|
+ <div id="charts"></div>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script setup>
|
|
|
+import { ref } from "vue";
|
|
|
+import { useCrud } from "@/hooks/userCrud";
|
|
|
+import dictDataUtil from "@/common/configs/dictDataUtil";
|
|
|
+
|
|
|
+import { useDictionaryStoreHook } from "@/store";
|
|
|
+
|
|
|
+// 数据字典相关
|
|
|
+const { dicts } = useDictionaryStoreHook();
|
|
|
+
|
|
|
+// 传入一个url,后面不带/
|
|
|
+const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
|
|
|
+ useCrud({
|
|
|
+ src: "/api/v1/plan/task",
|
|
|
+ });
|
|
|
+const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } =
|
|
|
+ Methords; //增删改查
|
|
|
+const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
|
|
|
+const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
|
|
|
+
|
|
|
+const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ dataList();
|
|
|
+});
|
|
|
+
|
|
|
+// 设置表格列或者其他自定义的option
|
|
|
+option.value = Object.assign(option.value, {
|
|
|
+ selection: true,
|
|
|
+ menu: false,
|
|
|
+ addBtn: false,
|
|
|
+ filterBtn: false,
|
|
|
+ searchShowBtn: false,
|
|
|
+ columnBtn: false,
|
|
|
+ gridBtn: false,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "序列号",
|
|
|
+ prop: "seqNo",
|
|
|
+ search: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "工位名称",
|
|
|
+ prop: "stationName",
|
|
|
+ search: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "工单编码",
|
|
|
+ prop: "workOrderCode",
|
|
|
+ search: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "工单名称",
|
|
|
+ prop: "workOrderName",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "产线编码",
|
|
|
+ prop: "productLineCode",
|
|
|
+ search: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "产线名称",
|
|
|
+ prop: "productLineName",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "工艺路线名称",
|
|
|
+ prop: "routeName",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "物料编号",
|
|
|
+ prop: "materialCode",
|
|
|
+ search: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "工单名称",
|
|
|
+ prop: "workOrderName",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "工序编码",
|
|
|
+ prop: "operationCode",
|
|
|
+ search: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "工序名称",
|
|
|
+ prop: "operationName",
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ label: "状态",
|
|
|
+ prop: "state",
|
|
|
+ type: "select",
|
|
|
+ search: true,
|
|
|
+ dicUrl:
|
|
|
+ dictDataUtil.request_url + dictDataUtil.TYPE_CODE.station_task_state,
|
|
|
+ props: {
|
|
|
+ label: "dictLabel",
|
|
|
+ value: "dictValue",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "计划开始时间",
|
|
|
+ prop: "planStartWhen",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "计划结束时间",
|
|
|
+ prop: "planStartEnd",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "修改时间",
|
|
|
+ prop: "updated",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+});
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+#charts {
|
|
|
+ width: 100%;
|
|
|
+ height: 300px;
|
|
|
+}
|
|
|
+</style>
|