|
@@ -2,7 +2,12 @@
|
|
|
<div class="body1" id="body1">
|
|
|
<div class="left">
|
|
|
<div style="margin-bottom: 20px">
|
|
|
- <el-select v-model="selectBraze" placeholder="请选择钎焊方式" @change="handleSelectChange" style="width:60%">
|
|
|
+ <el-select
|
|
|
+ v-model="selectBraze"
|
|
|
+ placeholder="请选择钎焊方式"
|
|
|
+ @change="handleSelectChange"
|
|
|
+ style="width: 60%"
|
|
|
+ >
|
|
|
<el-option
|
|
|
v-for="item in brazeOption"
|
|
|
:key="item.id"
|
|
@@ -11,11 +16,9 @@
|
|
|
>
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
- <el-button
|
|
|
- style="margin-left: 10px;"
|
|
|
- type="success"
|
|
|
- @click="finishAll"
|
|
|
- >一键完成</el-button>
|
|
|
+ <el-button style="margin-left: 10px" type="success" @click="finishAll"
|
|
|
+ >一键完成</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
|
|
|
<el-table
|
|
@@ -28,16 +31,12 @@
|
|
|
<el-table-column type="index" label="序号" align="center" />
|
|
|
<el-table-column prop="lineStart" label="起始端" align="center" />
|
|
|
<el-table-column prop="lineEnd" label="结束端" align="center" />
|
|
|
+ <el-table-column prop="lineNo" label="管号" align="center" />
|
|
|
+
|
|
|
<el-table-column prop="wireDiameter" label="线型" align="center" />
|
|
|
<el-table-column prop="length" label="长度" align="center" />
|
|
|
- <el-table-column prop="lineNo" label="管号" align="center" />
|
|
|
-<!-- <el-table-column prop="lineColor" label="颜色" align="center" />-->
|
|
|
- <el-table-column
|
|
|
- label="状态"
|
|
|
- width="120"
|
|
|
- fixed="right"
|
|
|
- align="center"
|
|
|
- >
|
|
|
+ <!-- <el-table-column prop="lineColor" label="颜色" align="center" />-->
|
|
|
+ <el-table-column label="状态" width="120" fixed="right" align="center">
|
|
|
<template #default="scope">
|
|
|
<el-button
|
|
|
:type="scope.row.state === 1 ? 'success' : 'danger'"
|
|
@@ -52,18 +51,26 @@
|
|
|
<div class="bottom">
|
|
|
<div>
|
|
|
<Pagination
|
|
|
- v-model:limit="page.pageSize"
|
|
|
- v-model:page="page.pageNo"
|
|
|
- :total="page.total"
|
|
|
- @pagination="pageChange"
|
|
|
+ v-model:limit="page.pageSize"
|
|
|
+ v-model:page="page.pageNo"
|
|
|
+ :total="page.total"
|
|
|
+ @pagination="pageChange"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="right">
|
|
|
- <el-image class="right" :src="baseUrl + imageUrl + '.jpg'" @click="toShowPDF(imageUrl)">
|
|
|
+ <el-image
|
|
|
+ style="width: 100%; height: 100%"
|
|
|
+ :src="baseUrl + imageUrl + '.jpg'"
|
|
|
+ @click="toShowPDF(imageUrl)"
|
|
|
+ >
|
|
|
<template #error>
|
|
|
- <el-image class="right" :src="DefaultPDF" fit="cover" />
|
|
|
+ <el-image
|
|
|
+ style="width: 100%; height: 100%"
|
|
|
+ :src="DefaultPDF"
|
|
|
+ fit="cover"
|
|
|
+ />
|
|
|
</template>
|
|
|
</el-image>
|
|
|
|
|
@@ -74,104 +81,118 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { useProcessStore } from "@/store";
|
|
|
-import {operationBrazeQuery, processBrazePage1, processBrazeUpdate,processBrazeCompleteAll} from '@/api/braze'
|
|
|
-import {ElMessageBox} from "element-plus";
|
|
|
+import {
|
|
|
+ operationBrazeQuery,
|
|
|
+ processBrazePage1,
|
|
|
+ processBrazeUpdate,
|
|
|
+ processBrazeCompleteAll,
|
|
|
+} from "@/api/braze";
|
|
|
+import { ElMessageBox } from "element-plus";
|
|
|
import DefaultPDF from "@/assets/images/default-pdf.png";
|
|
|
const proStore = useProcessStore();
|
|
|
-const selectBraze = ref([])
|
|
|
-const brazeOption = ref([])
|
|
|
+const selectBraze = ref([]);
|
|
|
+const brazeOption = ref([]);
|
|
|
const baseUrl = import.meta.env.VITE_APP_UPLOAD_URL;
|
|
|
const getBrazeOption = () => {
|
|
|
- operationBrazeQuery(proStore.odersData.operationId).then(res => {
|
|
|
- brazeOption.value = res.data
|
|
|
- if(res.data){
|
|
|
- selectBraze.value = res.data[0].id
|
|
|
- handleSelectChange(res.data[0].id)
|
|
|
+ operationBrazeQuery(proStore.odersData.operationId).then((res) => {
|
|
|
+ brazeOption.value = res.data;
|
|
|
+ if (res.data) {
|
|
|
+ selectBraze.value = res.data[0].id;
|
|
|
+ handleSelectChange(res.data[0].id);
|
|
|
}
|
|
|
- })
|
|
|
-}
|
|
|
+ });
|
|
|
+};
|
|
|
const page = reactive({
|
|
|
pageSize: 10,
|
|
|
pageNo: 1,
|
|
|
total: 0,
|
|
|
});
|
|
|
-getBrazeOption()
|
|
|
+getBrazeOption();
|
|
|
|
|
|
-const tableData = ref([])
|
|
|
+const tableData = ref([]);
|
|
|
|
|
|
const pageChange = () => {
|
|
|
const data = {
|
|
|
brazeId: selectBraze.value,
|
|
|
workOrderCode: proStore.odersData.workOrderCode,
|
|
|
processId: proStore.scanInfo.id,
|
|
|
- orders: [{
|
|
|
- column: 'created',
|
|
|
- isAsc: true
|
|
|
- }],
|
|
|
+ orders: [
|
|
|
+ {
|
|
|
+ column: "created",
|
|
|
+ isAsc: true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
pageSize: page.pageSize,
|
|
|
pageNo: page.pageNo,
|
|
|
- }
|
|
|
- processBrazePage1(data).then(res => {
|
|
|
- tableData.value = res.data.records
|
|
|
- page.total = res.data.totalCount
|
|
|
- })
|
|
|
-}
|
|
|
+ };
|
|
|
+ processBrazePage1(data).then((res) => {
|
|
|
+ tableData.value = res.data.records;
|
|
|
+ page.total = res.data.totalCount;
|
|
|
+ });
|
|
|
+};
|
|
|
const handleSelectChange = (brazeId) => {
|
|
|
- page.pageNo = 1
|
|
|
- if(!brazeId){
|
|
|
- brazeId = selectBraze.value
|
|
|
+ page.pageNo = 1;
|
|
|
+ if (!brazeId) {
|
|
|
+ brazeId = selectBraze.value;
|
|
|
}
|
|
|
- imageUrl.value = brazeOption.value.find(item => item.id == brazeId).filePath
|
|
|
+ imageUrl.value = brazeOption.value.find(
|
|
|
+ (item) => item.id == brazeId
|
|
|
+ ).filePath;
|
|
|
const data = {
|
|
|
brazeId,
|
|
|
workOrderCode: proStore.odersData.workOrderCode,
|
|
|
processId: proStore.scanInfo.id,
|
|
|
- orders: [{
|
|
|
- column: 'created',
|
|
|
- isAsc: true
|
|
|
- }],
|
|
|
+ orders: [
|
|
|
+ {
|
|
|
+ column: "created",
|
|
|
+ isAsc: true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
pageSize: page.pageSize,
|
|
|
pageNo: page.pageNo,
|
|
|
- }
|
|
|
- processBrazePage1(data).then(res => {
|
|
|
- tableData.value = res.data.records
|
|
|
- page.total = res.data.totalCount
|
|
|
- })
|
|
|
-}
|
|
|
-const finishAll = async() =>{
|
|
|
+ };
|
|
|
+ processBrazePage1(data).then((res) => {
|
|
|
+ tableData.value = res.data.records;
|
|
|
+ page.total = res.data.totalCount;
|
|
|
+ });
|
|
|
+};
|
|
|
+const finishAll = async () => {
|
|
|
ElMessageBox.confirm("确定要完成当前页所有吗?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning",
|
|
|
}).then(async () => {
|
|
|
- const params = {processId: proStore.scanInfo.id,brazeId: selectBraze.value}
|
|
|
- await processBrazeCompleteAll(params)
|
|
|
- ElMessage.success('操作成功');
|
|
|
- handleSelectChange(selectBraze.value)
|
|
|
- })
|
|
|
-}
|
|
|
+ const params = {
|
|
|
+ processId: proStore.scanInfo.id,
|
|
|
+ brazeId: selectBraze.value,
|
|
|
+ };
|
|
|
+ await processBrazeCompleteAll(params);
|
|
|
+ ElMessage.success("操作成功");
|
|
|
+ handleSelectChange(selectBraze.value);
|
|
|
+ });
|
|
|
+};
|
|
|
const toFinish = async (row) => {
|
|
|
const data = {
|
|
|
id: row.id,
|
|
|
- state: 1
|
|
|
- }
|
|
|
- await processBrazeUpdate(data)
|
|
|
- ElMessage.success('操作成功');
|
|
|
- handleSelectChange(selectBraze.value)
|
|
|
-}
|
|
|
-const highLight = ref(null)
|
|
|
-const imageUrl = ref("")
|
|
|
+ state: 1,
|
|
|
+ };
|
|
|
+ await processBrazeUpdate(data);
|
|
|
+ ElMessage.success("操作成功");
|
|
|
+ handleSelectChange(selectBraze.value);
|
|
|
+};
|
|
|
+const highLight = ref(null);
|
|
|
+const imageUrl = ref("");
|
|
|
watch(tableData, () => {
|
|
|
- const data = tableData.value.find(item => item.state == 0)
|
|
|
- highLight.value = data ? data.id : ''
|
|
|
-})
|
|
|
+ const data = tableData.value.find((item) => item.state == 0);
|
|
|
+ highLight.value = data ? data.id : "";
|
|
|
+});
|
|
|
const rowStyle = (data) => {
|
|
|
- if(highLight.value == data.row.id) {
|
|
|
+ if (highLight.value == data.row.id) {
|
|
|
return {
|
|
|
- backgroundColor: '#00eeff'
|
|
|
- }
|
|
|
+ backgroundColor: "#00eeff",
|
|
|
+ };
|
|
|
}
|
|
|
-}
|
|
|
+};
|
|
|
|
|
|
const PDFDrawerViewRef = ref(null);
|
|
|
const toShowPDF = (url) => {
|
|
@@ -184,19 +205,20 @@ const toShowPDF = (url) => {
|
|
|
width: 100%;
|
|
|
height: calc(100vh - 261px);
|
|
|
display: flex;
|
|
|
+
|
|
|
.left {
|
|
|
padding-right: 20px;
|
|
|
flex-shrink: 0;
|
|
|
- width: 50%;
|
|
|
+ width: 60%;
|
|
|
.tableView1 {
|
|
|
border-radius: 16px;
|
|
|
}
|
|
|
}
|
|
|
.right {
|
|
|
- flex: 1;
|
|
|
- flex-shrink: 0;
|
|
|
- height: 100%;
|
|
|
- overflow: hidden;
|
|
|
+ width: 40%;
|
|
|
+ right: 0;
|
|
|
+ top: 0;
|
|
|
+ height: calc(100vh - 261px);
|
|
|
}
|
|
|
}
|
|
|
</style>
|