123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- <!-- 生产履历 -->
- <template>
- <div class="mainContentBox">
- <avue-crud
- ref="crudRef2"
- v-model:search="search"
- v-model="form"
- :data="data"
- :option="option"
- v-model:page="page"
- />
- </div>
- </template>
- <script setup>
- import { ref, getCurrentInstance } from "vue";
- import { useCrud } from "@/hooks/userCrud";
- import dictDataUtil from "@/common/configs/dictDataUtil";
- import ButtonPermKeys from "@/common/configs/buttonPermission";
- import { useCommonStoreHook, useDictionaryStoreHook } from "@/store";
- // 数据字典相关
- const { dicts } = useDictionaryStoreHook();
- // 传入一个url,后面不带/
- const {
- form,
- data,
- option,
- search,
- page,
- toDeleteIds,
- Methords,
- Utils,
- commonConfig,
- } = useCrud({
- src: "/api/v1/process/info",
- });
- 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对象
- const refreshTra = (row) => {
- commonConfig.value.params = { seqNo: row.seqNo };
- dataList();
- };
- defineExpose({ refreshTra });
- onMounted(() => {});
- option.value = Object.assign(option.value, {
- selection: false,
- border: true,
- index: false,
- expandLevel: 3,
- headerAlign: "center",
- align: "center",
- labelWidth: 100,
- addBtn: false,
- menu: false,
- header: false,
- column: [
- {
- label: "工序名称",
- prop: "operationName",
- },
- {
- label: "工段",
- prop: "workSection",
- type: "select",
- dicData: dicts.workshop_section,
- props: {
- label: "dictLabel",
- value: "dictValue",
- },
- },
- {
- label: "状态",
- prop: "currentState",
- search: false,
- },
- {
- label: "开始时间",
- prop: "realStartWhen",
- search: false,
- },
- {
- label: "结束时间",
- prop: "realEndWhen",
- search: false,
- },
- {
- label: "操作人",
- prop: "creator",
- search: false,
- },
- {
- label: "工时(秒)",
- prop: "totalTime",
- search: false,
- },
- {
- label: "工步",
- prop: "operationSort",
- search: false,
- },
- ],
- });
- </script>
|