123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249 |
- <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"
- @selection-change="selectionChange"
- >
- <template #menu-left="{ size }">
- <el-button
- :disabled="toDeleteIds.length < 1"
- type="danger"
- icon="el-icon-delete"
- :size="size"
- @click="multipleDelete">删除</el-button>
- </template>
- </avue-crud>
- </div>
- </template>
- <script setup>
- import { ref, getCurrentInstance } from "vue";
- import { useCrud } from "@/hooks/userCrud";
- import ButtonPermKeys from "@/common/configs/buttonPermission";
- import { useCommonStoreHook } from "@/store";
- const { isShowTable, tableType } = toRefs(useCommonStoreHook());
- const test = () => {
- isShowTable.value = true;
- tableType.value = tableType.value == 1 ? 2 : 1;
- };
- // 传入一个url,后面不带/
- const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
- useCrud({
- src: "/api/v1/plan/order",
- });
- const { dataList, createRow, updateRow, deleteRow } = Methords; //增删改查
- const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
- const { checkBtnPerm } = Utils; //按钮权限等工具
- const crudRef = ref(null); //crudRef.value 获取avue-crud对象
- // 设置表格列或者其他自定义的option
- option.value = Object.assign(option.value, {
- selection: true,
- column: [
- {
- label: "主键",
- prop: "id",
- search: false,
- },
- {
- label: "创建日期",
- prop: "created",
- search: false,
- },
- {
- label: "创建人",
- prop: "creator",
- search: false,
- },
- {
- label: "更新日期",
- prop: "updated",
- search: false,
- },
- {
- label: "更新人",
- prop: "updator",
- search: false,
- },
- {
- label: "组织id",
- prop: "orgId",
- search: false,
- },
- {
- label: "部门id",
- prop: "deptId",
- search: false,
- },
- {
- label: "版本号",
- prop: "version",
- search: false,
- },
- {
- label: "基础工序名称",
- prop: "operationName",
- search: true,
- },
- {
- label: "工序编码",
- prop: "operationCode",
- search: false,
- },
- {
- label: "基础工序号",
- prop: "operationOp",
- search: true,
- },
- {
- label: "基础工序描述",
- prop: "operationDesc",
- search: false,
- },
- {
- label: "标准工时",
- prop: "standardWorktime",
- search: false,
- },
- {
- label: "工位类型",
- prop: "stanType",
- search: false,
- },
- {
- label: "技能要求",
- prop: "skillAsk",
- search: false,
- },
- {
- label: "工段",
- prop: "workSection",
- search: false,
- },
- {
- label: "工序类型",
- prop: "operationType",
- search: true,
- },
- /* {
- label: "机时",
- prop: "timeingNum",
- search: false,
- },*/
- /* {
- label: "是否外协",
- prop: "externalCooperation",
- search: false,
- },*/
- {
- label: "工艺条件",
- prop: "processAsk",
- search: false,
- },
- {
- label: "准备工时(人工工时)",
- prop: "preparationTime",
- search: false,
- },
- {
- label: "是否自检",
- prop: "selfCheck",
- search: false,
- },
- {
- label: "批量报工",
- prop: "batchReport",
- search: false,
- },
- {
- label: "是否巡检",
- prop: "inspection",
- search: false,
- },
- {
- label: "是否首检",
- prop: "firstCheck",
- search: false,
- },
- {
- label: "是否委外",
- prop: "outsourcing",
- search: false,
- },
- {
- label: "是否禁用",
- prop: "enabled",
- search: false,
- },
- {
- label: "是否可跳过",
- prop: "skipped",
- search: false,
- },
- /* {
- label: "坐标X",
- prop: "x",
- search: false,
- },
- {
- label: "坐标Y",
- prop: "y",
- search: false,
- },*/
- {
- label: "删除标识",
- prop: "deleted",
- search: false,
- },
- {
- label: "是否分批",
- prop: "batch",
- search: false,
- },
- {
- label: "是否合批",
- prop: "merge",
- search: false,
- },
- {
- label: "是否工艺数量",
- prop: "common",
- search: false,
- },
- {
- label: "分批数量",
- prop: "batchNum",
- search: false,
- },
- {
- label: "合批数量",
- prop: "mergeNum",
- search: false,
- },
- {
- label: "前置时间",
- prop: "forceTime",
- search: false,
- },
- {
- label: "外协时间",
- prop: "outTime",
- search: false,
- },
- ],
- });
- onMounted(() => {
- dataList();
- });
- </script>
|