| | |
| | | import {useRouter} from "vue-router" |
| | | const router = useRouter() |
| | | import type { TableColumnCtx } from 'element-plus' |
| | | |
| | | |
| | | // import { ref } from 'vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | const dialogFormVisible = ref(false) |
| | |
| | | const adda = ref(false) |
| | | // const value = ref('') |
| | | import request from "@/utils/request" |
| | | |
| | | |
| | | import { ref, onMounted } from "vue"; |
| | | // import http from "@/http/index"; |
| | | |
| | | |
| | | let ruleForm = ref({ |
| | | workstationId: '', |
| | | patternHeigth: '', |
| | |
| | | filmsId: '', |
| | | patternThickness: '', |
| | | number: '', |
| | | |
| | | |
| | | }) |
| | | const tableDataa = ref([]) |
| | | |
| | |
| | | // damageDetails: { |
| | | // state: '', |
| | | // }, |
| | | |
| | | |
| | | // }) |
| | | // 发送获取表格数据的请求 |
| | | const fetchTableData = async () => { |
| | |
| | | // 发送获取表格数据的请求,并等待响应 |
| | | // const response = await request.post("/loadGlass/optimizeProject/listByState", requestData); |
| | | const response = await request.get("/loadGlass/up-patten-usage/prioritylist"); |
| | | |
| | | |
| | | // 检查响应状态 |
| | | if (response.code === 200) { |
| | | // 更新表格数据 |
| | |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | processType: [], |
| | | |
| | | |
| | | }) |
| | | const getBasicData = ref({ |
| | | id: '', |
| | |
| | | // } |
| | | // }, |
| | | // methods:{ |
| | | |
| | | |
| | | // } |
| | | // } |
| | | const workstationId = ref(''); |
| | |
| | | const filmsId = ref(''); |
| | | const patternThickness = ref(''); |
| | | const number = ref(''); |
| | | |
| | | |
| | | // 添加 |
| | | const handleConfirm = async () => { |
| | | try { |
| | |
| | | patternThickness: patternThickness.value, |
| | | number: number.value |
| | | }); |
| | | |
| | | |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | |
| | | patternThickness: 0, |
| | | number: 0 |
| | | }); |
| | | |
| | | |
| | | if (response.code == 200) { |
| | | // 绑定成功,处理逻辑 |
| | | ElMessage.success(response.message); |
| | |
| | | amount2: string |
| | | amount3: number |
| | | } |
| | | |
| | | |
| | | interface SpanMethodProps { |
| | | row: User |
| | | column: TableColumnCtx<User> |
| | | rowIndex: number |
| | | columnIndex: number |
| | | } |
| | | |
| | | // const objectSpanMethod = ({ |
| | | // row, |
| | | // column, |
| | | // rowIndex, |
| | | // columnIndex, |
| | | // }: SpanMethodProps) => { |
| | | // if (columnIndex === 0) { |
| | | // if (rowIndex % 2 === 0) { |
| | | // return { |
| | | // rowspan: 2, |
| | | // colspan: 1, |
| | | // } |
| | | // } else { |
| | | // return { |
| | | // rowspan: 0, |
| | | // colspan: 0, |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | // const open = () => { |
| | | // ElMessageBox.confirm( |
| | | // '是否删除该条信息?', |
| | | // '提示', |
| | | // { |
| | | // confirmButtonText: '是', |
| | | // cancelButtonText: '取消', |
| | | // type: 'warning', |
| | | // } |
| | | // ) |
| | | // .then(() => { |
| | | // ElMessage({ |
| | | // type: 'success', |
| | | // message: '删除成功!', |
| | | // }) |
| | | // }) |
| | | // .catch(() => { |
| | | // ElMessage({ |
| | | // type: 'info', |
| | | // message: '删除失败', |
| | | // }) |
| | | // }) |
| | | // } |
| | | |
| | | const objectSpanMethod = ({ |
| | | row, |
| | | column, |
| | | rowIndex, |
| | | columnIndex, |
| | | }: SpanMethodProps) => { |
| | | if (columnIndex === 0) { |
| | | if (rowIndex % 2 === 0) { |
| | | return { |
| | | rowspan: 2, |
| | | colspan: 1, |
| | | } |
| | | } else { |
| | | return { |
| | | rowspan: 0, |
| | | colspan: 0, |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | const open = () => { |
| | | ElMessageBox.confirm( |
| | | '是否删除该条信息?', |
| | | '提示', |
| | | { |
| | | confirmButtonText: '是', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | } |
| | | ) |
| | | .then(() => { |
| | | ElMessage({ |
| | | type: 'success', |
| | | message: '删除成功!', |
| | | }) |
| | | }) |
| | | .catch(() => { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: '删除失败', |
| | | }) |
| | | }) |
| | | } |
| | | const handleBindRack = (row) => { |
| | | workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名 |
| | | |
| | | add.value = true; // 打开绑定架子对话框 |
| | | }; |
| | | const handleBindRacka = (row) => { |
| | | workstationId.value = row.workstationId; // 假设rackNumber是架号字段的属性名 |
| | | |
| | | adda.value = true; // 打开绑定架子对话框 |
| | | }; |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | ], |
| | | }) |
| | | </script> |
| | | |
| | | |
| | | <template> |
| | | <div> |
| | | <div id="dotClass"> |
| | |
| | | min-width="80" |
| | | prop="state" |
| | | > |
| | | <!-- <el-tag type="success" v-if="damageDetails.state === 1">就绪</el-tag> --> |
| | | <template #default="scope"> |
| | | <el-tag type="success" >{{ scope.row.state==1?"就绪":"未就绪" }}</el-tag> |
| | | </template> |
| | | |
| | | <!-- <el-tag type="danger" v-if="row.enableState==2">未就绪</el-tag> --> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <el-table-column prop="filmsId" align="center" label="膜系" min-width="80" /> |
| | | <el-table-column prop="number" align="center" label="数量" min-width="80" /> |
| | | <el-table-column fixed="right" label="操作" align="center" width="150"> |
| | | <template #default> |
| | | <el-button size="mini" type="text" plain @click="add = true">添加</el-button> |
| | | <el-button size="mini" type="text" plain @click="adda = true">删除</el-button> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="handleBindRack(scope.row)">添加</el-button> |
| | | <el-button size="mini" type="text" plain @click="handleBindRacka(scope.row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <el-dialog v-model="dialogFormVisible" top="24vh" width="30%" title="工程" > |
| | | <div style="margin-left: 50px;margin-bottom: 10px;"> |
| | | <el-form-item label="工程号:" :required="true"> |
| | | <el-select v-model="getBasicData.projectNo" clearable placeholder="请选择工程" style="width: 220px" |
| | | > |
| | | <el-option |
| | | v-for="item in titleSelectJson['processType']" |
| | | :key="item.id" |
| | | :label="item.projectNo" |
| | | :value="item.projectNo" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="dialogFormVisible = false"> |
| | | 确认 |
| | | </el-button> |
| | | <el-button @click="dialogFormVisible = false">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | <el-dialog v-model="add" top="23vh" width="45%" title="添加原片" > |
| | | <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;"> |
| | | <el-form size="mini" label-width="150px"> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | |
| | | |
| | | <el-dialog v-model="dialogFormVisible" top="24vh" width="30%" title="工程" > |
| | | <div style="margin-left: 50px;margin-bottom: 10px;"> |
| | | <el-form-item label="工程号:" :required="true"> |
| | | <el-select v-model="getBasicData.projectNo" clearable placeholder="请选择工程" style="width: 220px" |
| | | > |
| | | <el-option |
| | | v-for="item in titleSelectJson['processType']" |
| | | :key="item.id" |
| | | :label="item.projectNo" |
| | | :value="item.projectNo" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="dialogFormVisible = false"> |
| | | 确认 |
| | | </el-button> |
| | | <el-button @click="dialogFormVisible = false">取消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | |
| | | <style scoped> |
| | | |
| | | |
| | | #dt { display:block; float:left;line-height: 20px;margin-left: 100px;} |
| | | #dta { display:block; float:left;line-height: 20px;margin-left: 80%;} |
| | | #dialog-footer{ |
| | |
| | | margin-top: -40px; |
| | | margin-left: 167px; |
| | | } |
| | | |
| | | |
| | | </style> |