|
@@ -1,23 +1,22 @@
|
|
|
<template>
|
|
|
<div class="mainContentBox">
|
|
|
<avue-crud
|
|
|
- ref="crudRef"
|
|
|
- v-model:search="search"
|
|
|
- v-model="form"
|
|
|
- :data="data"
|
|
|
- :option="option"
|
|
|
- v-model:page="page"
|
|
|
- @row-click="rowClick"
|
|
|
- @search-change="searchChange"
|
|
|
- @search-reset="resetChange"
|
|
|
- @size-change="dataList"
|
|
|
- @current-change="dataList"
|
|
|
- >
|
|
|
- </avue-crud>
|
|
|
+ ref="crudRef"
|
|
|
+ v-model:search="search"
|
|
|
+ v-model="form"
|
|
|
+ :data="data"
|
|
|
+ :option="option"
|
|
|
+ v-model:page="page"
|
|
|
+ @row-click="rowClick"
|
|
|
+ @search-change="searchChange"
|
|
|
+ @search-reset="resetChange"
|
|
|
+ @size-change="dataList"
|
|
|
+ @current-change="dataList"
|
|
|
+ />
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
-import {defineProps, ref} from "vue";
|
|
|
+import { defineProps, ref } from "vue";
|
|
|
import { useCrud } from "@/hooks/userCrud";
|
|
|
|
|
|
import { useCommonStoreHook } from "@/store";
|
|
@@ -32,23 +31,24 @@ const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
|
|
|
useCrud({
|
|
|
src: "/api/v1/plan/workOrder",
|
|
|
});
|
|
|
-const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } = Methords; //增删改查
|
|
|
+const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } =
|
|
|
+ Methords; //增删改查
|
|
|
const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
|
|
|
const { checkBtnPerm, downloadTemplate } = Utils; //按钮权限等工具
|
|
|
|
|
|
const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
|
-const emit = defineEmits(["orderInfo"])
|
|
|
-const rowClick = (row)=>{
|
|
|
- emit("orderInfo", row)
|
|
|
-}
|
|
|
+const emit = defineEmits(["orderInfo"]);
|
|
|
+const rowClick = (row) => {
|
|
|
+ emit("orderInfo", row);
|
|
|
+};
|
|
|
const props = defineProps({
|
|
|
queryType: {
|
|
|
type: String,
|
|
|
default: () => {
|
|
|
return "0";
|
|
|
- }
|
|
|
- }
|
|
|
-})
|
|
|
+ },
|
|
|
+ },
|
|
|
+});
|
|
|
// 设置表格列或者其他自定义的option
|
|
|
option.value = Object.assign(option.value, {
|
|
|
delBtn: false,
|
|
@@ -113,7 +113,7 @@ option.value = Object.assign(option.value, {
|
|
|
width: "80",
|
|
|
type: "select", //类型为下拉选择框
|
|
|
dicUrl:
|
|
|
- dictDataUtil.request_url + dictDataUtil.TYPE_CODE.plan_order_priority,
|
|
|
+ dictDataUtil.request_url + dictDataUtil.TYPE_CODE.plan_order_priority,
|
|
|
props: {
|
|
|
label: "dictLabel",
|
|
|
value: "dictValue",
|
|
@@ -126,7 +126,7 @@ option.value = Object.assign(option.value, {
|
|
|
display: false,
|
|
|
type: "select", //类型为下拉选择框
|
|
|
dicUrl:
|
|
|
- dictDataUtil.request_url + dictDataUtil.TYPE_CODE.plan_work_order_state,
|
|
|
+ dictDataUtil.request_url + dictDataUtil.TYPE_CODE.plan_work_order_state,
|
|
|
props: {
|
|
|
label: "dictLabel",
|
|
|
value: "dictValue",
|
|
@@ -143,8 +143,7 @@ option.value = Object.assign(option.value, {
|
|
|
prop: "opType",
|
|
|
width: "100",
|
|
|
type: "select", //类型为下拉选择框
|
|
|
- dicUrl:
|
|
|
- dictDataUtil.request_url + dictDataUtil.TYPE_CODE.op_group,
|
|
|
+ dicUrl: dictDataUtil.request_url + dictDataUtil.TYPE_CODE.op_group,
|
|
|
props: {
|
|
|
label: "dictLabel",
|
|
|
value: "dictValue",
|
|
@@ -199,7 +198,6 @@ option.value = Object.assign(option.value, {
|
|
|
width: 85,
|
|
|
display: false,
|
|
|
prop: "completeNum",
|
|
|
-
|
|
|
},
|
|
|
{
|
|
|
label: "下线数量",
|
|
@@ -229,7 +227,7 @@ option.value = Object.assign(option.value, {
|
|
|
});
|
|
|
|
|
|
onMounted(() => {
|
|
|
- search.value.queryType = props.queryType
|
|
|
+ search.value.queryType = String(props.queryType);
|
|
|
dataList();
|
|
|
});
|
|
|
</script>
|