|
@@ -6,6 +6,7 @@
|
|
v-model:search="search"
|
|
v-model:search="search"
|
|
v-model="form"
|
|
v-model="form"
|
|
:data="data"
|
|
:data="data"
|
|
|
|
+ @tree-load="treeLoad"
|
|
:option="option"
|
|
:option="option"
|
|
@row-update="updateRow"
|
|
@row-update="updateRow"
|
|
v-model:page="page"
|
|
v-model:page="page"
|
|
@@ -13,13 +14,98 @@
|
|
@search-reset="resetChange"
|
|
@search-reset="resetChange"
|
|
@size-change="dataList"
|
|
@size-change="dataList"
|
|
@current-change="dataList"
|
|
@current-change="dataList"
|
|
- />
|
|
|
|
|
|
+ :span-method="spanMethod"
|
|
|
|
+ >
|
|
|
|
+ <template #operationName="{ row }">
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="!row.id"
|
|
|
|
+ v-for="b in row.list"
|
|
|
|
+ @click="clientB(b.type,b.processId)"
|
|
|
|
+ type="primary"
|
|
|
|
+ link
|
|
|
|
+ >{{ b.operationName }}</el-button>
|
|
|
|
+ <el-tag v-if="row.id" type="primary">{{ row.operationName }}</el-tag>
|
|
|
|
+ </template>
|
|
|
|
+ </avue-crud>
|
|
<CommonTable
|
|
<CommonTable
|
|
ref="userRef"
|
|
ref="userRef"
|
|
tableTitle="操作人选择"
|
|
tableTitle="操作人选择"
|
|
tableType="USERS"
|
|
tableType="USERS"
|
|
@selected-sure="onUserSelectedFinish"
|
|
@selected-sure="onUserSelectedFinish"
|
|
/>
|
|
/>
|
|
|
|
+ <el-dialog
|
|
|
|
+ v-model="dialog.visible"
|
|
|
|
+ :title="dialog.title"
|
|
|
|
+ width="850px"
|
|
|
|
+ @close="dialog.visible = false"
|
|
|
|
+ :destroy-on-close="true"
|
|
|
|
+ >
|
|
|
|
+ <mediaCom :processId="processInfo.processId"/>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
|
|
+ <el-dialog
|
|
|
|
+ v-model="dialog2.visible"
|
|
|
|
+ :title="dialog2.title"
|
|
|
|
+ width="850px"
|
|
|
|
+ @close="dialog2.visible = false"
|
|
|
|
+ :destroy-on-close="true"
|
|
|
|
+ >
|
|
|
|
+ <excelCom :processId="processInfo.processId"/>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ <el-dialog
|
|
|
|
+ v-model="dialog3.visible"
|
|
|
|
+ :title="dialog3.title"
|
|
|
|
+ width="850px"
|
|
|
|
+ @close="dialog3.visible = false"
|
|
|
|
+ :destroy-on-close="true"
|
|
|
|
+ >
|
|
|
|
+ <RecordCom :processId="processInfo.processId"/>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ <el-dialog
|
|
|
|
+ v-model="dialog4.visible"
|
|
|
|
+ :title="dialog4.title"
|
|
|
|
+ width="850px"
|
|
|
|
+ @close="dialog4.visible = false"
|
|
|
|
+ :destroy-on-close="true"
|
|
|
|
+ >
|
|
|
|
+ <MaterialsCom :processId="processInfo.processId"/>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ <el-dialog
|
|
|
|
+ v-model="dialog5.visible"
|
|
|
|
+ :title="dialog5.title"
|
|
|
|
+ width="850px"
|
|
|
|
+ @close="dialog5.visible = false"
|
|
|
|
+ :destroy-on-close="true"
|
|
|
|
+ >
|
|
|
|
+ <CheckCom :processId="processInfo.processId"/>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ <el-dialog
|
|
|
|
+ v-model="dialog6.visible"
|
|
|
|
+ :title="dialog6.title"
|
|
|
|
+ width="850px"
|
|
|
|
+ @close="dialog6.visible = false"
|
|
|
|
+ :destroy-on-close="true"
|
|
|
|
+ >
|
|
|
|
+ <EquitCom :processId="processInfo.processId"/>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ <el-dialog
|
|
|
|
+ v-model="dialog7.visible"
|
|
|
|
+ :title="dialog7.title"
|
|
|
|
+ width="850px"
|
|
|
|
+ @close="dialog7.visible = false"
|
|
|
|
+ :destroy-on-close="true"
|
|
|
|
+ >
|
|
|
|
+ <FaultCom :processId="processInfo.processId"/>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ <el-dialog
|
|
|
|
+ v-model="dialog8.visible"
|
|
|
|
+ :title="dialog8.title"
|
|
|
|
+ width="850px"
|
|
|
|
+ @close="dialog8.visible = false"
|
|
|
|
+ :destroy-on-close="true"
|
|
|
|
+ >
|
|
|
|
+ <testCom :processId="processInfo.processId"/>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script setup>
|
|
<script setup>
|
|
@@ -27,15 +113,101 @@ import { ref, getCurrentInstance } 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 ButtonPermKeys from "@/common/configs/buttonPermission";
|
|
import ButtonPermKeys from "@/common/configs/buttonPermission";
|
|
|
|
+import MaterialsCom from "@/views/pro/traceability/components/materialsCom.vue";
|
|
|
|
+import RecordCom from "@/views/pro/traceability/components/recordCom.vue";
|
|
|
|
+import CheckCom from "@/views/pro/traceability/components/checkCom.vue";
|
|
|
|
+import EquitCom from "@/views/pro/traceability/components/equitCom.vue";
|
|
|
|
+import FaultCom from "@/views/pro/traceability/components/faultCom.vue";
|
|
|
|
+import mediaCom from "@/views/pro/traceability/components/mediaCom.vue";
|
|
|
|
+import excelCom from "@/views/pro/traceability/components/excelCom.vue";
|
|
|
|
+import testCom from "@/views/pro/traceability/components/testData.vue";
|
|
import {
|
|
import {
|
|
useCommonStoreHook,
|
|
useCommonStoreHook,
|
|
useDictionaryStore,
|
|
useDictionaryStore,
|
|
useUserStoreHook,
|
|
useUserStoreHook,
|
|
} from "@/store";
|
|
} from "@/store";
|
|
|
|
+import {treeList} from "@/api/process";
|
|
|
|
+import TestData from "@/views/pro/traceability/components/testData.vue";
|
|
|
|
|
|
// 数据字典相关
|
|
// 数据字典相关
|
|
const { dicts } = useDictionaryStore();
|
|
const { dicts } = useDictionaryStore();
|
|
const userStore = useUserStoreHook();
|
|
const userStore = useUserStoreHook();
|
|
|
|
+const dialog= reactive({
|
|
|
|
+ visible: false,
|
|
|
|
+ title: "图片采集",
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+const dialog2= reactive({
|
|
|
|
+ visible: false,
|
|
|
|
+ title: "数据表格",
|
|
|
|
+});
|
|
|
|
+const dialog3= reactive({
|
|
|
|
+ visible: false,
|
|
|
|
+ title: "记录项",
|
|
|
|
+});
|
|
|
|
+const dialog4= reactive({
|
|
|
|
+ visible: false,
|
|
|
|
+ title: "物料采集",
|
|
|
|
+});
|
|
|
|
+const dialog5= reactive({
|
|
|
|
+ visible: false,
|
|
|
|
+ title: "点检项",
|
|
|
|
+});
|
|
|
|
+const dialog6= reactive({
|
|
|
|
+ visible: false,
|
|
|
|
+ title: "设备使用",
|
|
|
|
+});
|
|
|
|
+const dialog7= reactive({
|
|
|
|
+ visible: false,
|
|
|
|
+ title: "报故记录",
|
|
|
|
+});
|
|
|
|
+const dialog8= reactive({
|
|
|
|
+ visible: false,
|
|
|
|
+ title: "设备采集",
|
|
|
|
+});
|
|
|
|
+const processInfo = ref({});
|
|
|
|
+const clientB = (type,processId)=>{
|
|
|
|
+ if(type==="medias"){
|
|
|
|
+ dialog.visible=true;
|
|
|
|
+ processInfo.value.processId=processId;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if(type==="excel"){
|
|
|
|
+ dialog2.visible=true;
|
|
|
|
+ processInfo.value.processId=processId;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if(type==="record"){
|
|
|
|
+ dialog3.visible=true;
|
|
|
|
+ processInfo.value.processId=processId;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if(type==="materials"){
|
|
|
|
+ dialog4.visible=true;
|
|
|
|
+ processInfo.value.processId=processId;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if(type==="checks"){
|
|
|
|
+ dialog5.visible=true;
|
|
|
|
+ processInfo.value.processId=processId;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if(type==="equit"){
|
|
|
|
+ dialog6.visible=true;
|
|
|
|
+ processInfo.value.processId=processId;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if(type==="fault"){
|
|
|
|
+ dialog7.visible=true;
|
|
|
|
+ processInfo.value.processId=processId;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if(type==="testData"){
|
|
|
|
+ dialog8.visible=true;
|
|
|
|
+ processInfo.value.processId=processId;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
|
|
// 传入一个url,后面不带/
|
|
// 传入一个url,后面不带/
|
|
const {
|
|
const {
|
|
@@ -64,6 +236,17 @@ const refreshTra = (row) => {
|
|
commonConfig.value.params = { seqNo: row.seqNo,workOrderCode: row.workOrderCode};
|
|
commonConfig.value.params = { seqNo: row.seqNo,workOrderCode: row.workOrderCode};
|
|
dataList();
|
|
dataList();
|
|
};
|
|
};
|
|
|
|
+const spanMethod = ({ row, column, rowIndex, columnIndex })=> {
|
|
|
|
+ if (!row.id) {
|
|
|
|
+ if (columnIndex === 0) {
|
|
|
|
+ return [1, 9]
|
|
|
|
+ } else if(columnIndex > 0){
|
|
|
|
+ return [0, 0]
|
|
|
|
+ }
|
|
|
|
+ }else{
|
|
|
|
+ console.log(rowIndex)
|
|
|
|
+ }
|
|
|
|
+}
|
|
defineExpose({ refreshTra });
|
|
defineExpose({ refreshTra });
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
if (userStore.user.userId === 10000) {
|
|
if (userStore.user.userId === 10000) {
|
|
@@ -75,6 +258,7 @@ onMounted(() => {
|
|
option.value = Object.assign(option.value, {
|
|
option.value = Object.assign(option.value, {
|
|
selection: false,
|
|
selection: false,
|
|
border: true,
|
|
border: true,
|
|
|
|
+ lazy: true,
|
|
index: false,
|
|
index: false,
|
|
expandLevel: 3,
|
|
expandLevel: 3,
|
|
headerAlign: "center",
|
|
headerAlign: "center",
|
|
@@ -99,9 +283,9 @@ option.value = Object.assign(option.value, {
|
|
label: "工序名称",
|
|
label: "工序名称",
|
|
prop: "operationName",
|
|
prop: "operationName",
|
|
editDisplay: false,
|
|
editDisplay: false,
|
|
- width: 120,
|
|
|
|
|
|
+ width: 200,
|
|
},
|
|
},
|
|
- {
|
|
|
|
|
|
+ /* {
|
|
label: "工段",
|
|
label: "工段",
|
|
prop: "workSection",
|
|
prop: "workSection",
|
|
editDisplay: false,
|
|
editDisplay: false,
|
|
@@ -111,7 +295,7 @@ option.value = Object.assign(option.value, {
|
|
label: "dictLabel",
|
|
label: "dictLabel",
|
|
value: "dictValue",
|
|
value: "dictValue",
|
|
},
|
|
},
|
|
- },
|
|
|
|
|
|
+ },*/
|
|
{
|
|
{
|
|
label: "状态",
|
|
label: "状态",
|
|
editDisplay: false,
|
|
editDisplay: false,
|
|
@@ -199,15 +383,27 @@ option.value = Object.assign(option.value, {
|
|
editDisplay: false,
|
|
editDisplay: false,
|
|
search: false,
|
|
search: false,
|
|
},
|
|
},
|
|
- {
|
|
|
|
|
|
+ /* {
|
|
label: "工步",
|
|
label: "工步",
|
|
prop: "operationSort",
|
|
prop: "operationSort",
|
|
editDisplay: false,
|
|
editDisplay: false,
|
|
search: false,
|
|
search: false,
|
|
- },
|
|
|
|
|
|
+ },*/
|
|
],
|
|
],
|
|
});
|
|
});
|
|
-
|
|
|
|
|
|
+const treeLoad = (tree, treeNode, resolve) =>{
|
|
|
|
+ treeList({ id: tree.id}).then((data)=>{
|
|
|
|
+ if(data.data){
|
|
|
|
+ data.data.forEach(item=>{
|
|
|
|
+ item.operationName = item.label
|
|
|
|
+ item.id = null,
|
|
|
|
+ item.processId = tree.id
|
|
|
|
+ })
|
|
|
|
+ let list = [{id: null,list: data.data}];
|
|
|
|
+ resolve(list)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+}
|
|
// const validateTimeEnd = (rule, value, callback) => {
|
|
// const validateTimeEnd = (rule, value, callback) => {
|
|
// if (value === "") {
|
|
// if (value === "") {
|
|
// callback(new Error("Please input the password again"));
|
|
// callback(new Error("Please input the password again"));
|