|
@@ -1,12 +1,31 @@
|
|
<template>
|
|
<template>
|
|
<div class="mainContentBox">
|
|
<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">
|
|
|
|
|
|
+ <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="{ size, row, index }">
|
|
<template #menu="{ size, row, index }">
|
|
- <el-button icon="el-icon-edit" text v-if="row.state === '-1' || row.state === '0'"
|
|
|
|
- @click="handleEdit(row, index)" type="primary" :size="size">编辑</el-button>
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ icon="el-icon-edit"
|
|
|
|
+ text
|
|
|
|
+ v-if="row.state === '-1' || row.state === '0' || row.state === '1'"
|
|
|
|
+ @click="handleEdit(row, index)"
|
|
|
|
+ type="primary"
|
|
|
|
+ :size="size"
|
|
|
|
+ >编辑</el-button
|
|
|
|
+ >
|
|
</template>
|
|
</template>
|
|
<template #menu-left>
|
|
<template #menu-left>
|
|
<div id="charts"></div>
|
|
<div id="charts"></div>
|
|
@@ -19,6 +38,7 @@ import { ref } from "vue";
|
|
import { useCrud } from "@/hooks/userCrud";
|
|
import { useCrud } from "@/hooks/userCrud";
|
|
import dictDataUtil from "@/common/configs/dictDataUtil";
|
|
import dictDataUtil from "@/common/configs/dictDataUtil";
|
|
import { queryStationByLineId } from "@/api/station";
|
|
import { queryStationByLineId } from "@/api/station";
|
|
|
|
+import { getUserList } from "@/api/system/user";
|
|
import { useDictionaryStore } from "@/store";
|
|
import { useDictionaryStore } from "@/store";
|
|
import { getStatistics } from "@/api/order/index";
|
|
import { getStatistics } from "@/api/order/index";
|
|
import * as echarts from "echarts";
|
|
import * as echarts from "echarts";
|
|
@@ -38,11 +58,20 @@ const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等
|
|
|
|
|
|
const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
const crudRef = ref(null); //crudRef.value 获取avue-crud对象
|
|
const stationList = ref([]);
|
|
const stationList = ref([]);
|
|
|
|
+const userList = ref([]);
|
|
const charts = shallowRef(null);
|
|
const charts = shallowRef(null);
|
|
const handleEdit = (row, index) => {
|
|
const handleEdit = (row, index) => {
|
|
queryStationByLineId(row.productLineId).then((data) => {
|
|
queryStationByLineId(row.productLineId).then((data) => {
|
|
stationList.value = data.data;
|
|
stationList.value = data.data;
|
|
});
|
|
});
|
|
|
|
+ getUserList({}).then((data) => {
|
|
|
|
+ userList.value = data.data;
|
|
|
|
+ });
|
|
|
|
+ if (row.state === "1") {
|
|
|
|
+ option.value.column[2].editDisabled = true;
|
|
|
|
+ option.value.column[12].editDisabled = true;
|
|
|
|
+ option.value.column[13].editDisabled = true;
|
|
|
|
+ }
|
|
crudRef.value && crudRef.value.rowEdit(row, index);
|
|
crudRef.value && crudRef.value.rowEdit(row, index);
|
|
};
|
|
};
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
@@ -115,6 +144,7 @@ option.value = Object.assign(option.value, {
|
|
editDisabled: false,
|
|
editDisabled: false,
|
|
type: "select",
|
|
type: "select",
|
|
dicData: stationList,
|
|
dicData: stationList,
|
|
|
|
+ filterable: true,
|
|
prop: "stationId",
|
|
prop: "stationId",
|
|
props: { label: "name", value: "id" },
|
|
props: { label: "name", value: "id" },
|
|
rules: [
|
|
rules: [
|
|
@@ -126,6 +156,16 @@ option.value = Object.assign(option.value, {
|
|
],
|
|
],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
|
|
+ label: "分配人员",
|
|
|
|
+ editDisabled: false,
|
|
|
|
+ type: "select",
|
|
|
|
+ dicData: userList,
|
|
|
|
+ filterable: true,
|
|
|
|
+ prop: "allocationUser",
|
|
|
|
+ dicMethod: "post",
|
|
|
|
+ props: { label: "userName", value: "userName" },
|
|
|
|
+ },
|
|
|
|
+ {
|
|
label: "工单编码",
|
|
label: "工单编码",
|
|
prop: "workOrderCode",
|
|
prop: "workOrderCode",
|
|
search: true,
|
|
search: true,
|