From 09381335e11d32e01c8067b71d897c7064ec279d Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期一, 20 五月 2024 14:38:18 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes
---
UI-Project/src/views/Caching/cachingun.vue | 146 ++++++++++++++++++++----------------------------
1 files changed, 62 insertions(+), 84 deletions(-)
diff --git a/UI-Project/src/views/Caching/cachingun.vue b/UI-Project/src/views/Caching/cachingun.vue
index 7ed5e6a..ba1686f 100644
--- a/UI-Project/src/views/Caching/cachingun.vue
+++ b/UI-Project/src/views/Caching/cachingun.vue
@@ -3,6 +3,7 @@
import {reactive} from "vue";
import {useRouter} from "vue-router"
const router = useRouter()
+const adda = ref(false)
import request from "@/utils/request"
import { ref, onMounted } from "vue";
@@ -11,95 +12,52 @@
// import LanguageMixin from './lang/LanguageMixin'
const tableData = ref([])
+const slot = ref('')
+
-// 鍙戦�佽幏鍙栬〃鏍兼暟鎹殑璇锋眰
-// const fetchTableData = async () => {
-// try {
-// // 鍙戦�佽幏鍙栬〃鏍兼暟鎹殑璇锋眰锛屽苟绛夊緟鍝嶅簲
-// // const response = await request.post("/loadGlass/optimizeProject/listByState", requestData);
-// const response = await request.get("unLoadGlass/downStorage/selectStorageCage");
-
-// // 妫�鏌ュ搷搴旂姸鎬�
-// if (response.code === 200) {
-// // 鏇存柊琛ㄦ牸鏁版嵁
-// console.log('鎴愬姛鑾峰彇琛ㄦ牸鏁版嵁:', response.data);
-// tableData.splice(0, tableData.length, ...response.data);
-// } else {
-// // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
-// ElMessage.error(response.msg);
-// }
-// } catch (error) {
-// // 澶勭悊璇锋眰澶辫触鐨勬儏鍐�
-// ElMessage.error('鑾峰彇琛ㄦ牸鏁版嵁澶辫触锛岃閲嶈瘯');
-// }
-// };
-// onMounted(fetchTableData);
-
-
-
-request.get("unLoadGlass/downStorage/selectStorageCage").then((res) => {
+request.get("/unLoadGlass/downStorage/selectStorageCage").then((res) => {
if (res.code == 200) {
+
console.log(res.data);
tableData.value = res.data
+ console.log(res.data[0].slot);
} else {
ElMessage.warning(res.msg)
}
});
-const dialogForm = () => {
- ElMessageBox.confirm(
- '鏄惁鎶ョ己?',
- '鎻愮ず',
- {
- confirmButtonText: '鏄�',
- cancelButtonText: '鍙栨秷',
- type: 'warning',
- }
- )
- .then(() => {
- // this.boxa = true
- // this.box = false
-
+const open = async(row) => {
+ try {
+ const confirmResult = await ElMessageBox.confirm(
+ '鏄惁鎶ョ己璇ユ潯淇℃伅?',
+ '鎻愮ず',
+ {
+ confirmButtonText: '鏄�',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning',
+ }
+ );
+ if (confirmResult === 'confirm') {
+ // 鐢ㄦ埛鐐瑰嚮浜嗏�滄槸鈥濓紝鐜板湪璋冪敤鍒犻櫎鎺ュ彛
+ var url="/cacheGlass/edgStorageCage/edgStorageCageGlass?edgStorageCageId="+row.id;
+ console.log(url);
+ const response = await request.post(url, {
+ esdId: row.esdId
})
-}
-const open = () => {
- ElMessageBox.confirm(
- '鏄惁鍒犻櫎璇ユ潯淇℃伅?',
- '鎻愮ず',
- {
- confirmButtonText: '鏄�',
- cancelButtonText: '鍙栨秷',
- type: 'warning',
- }
- )
- .then(() => {
- ElMessage({
- type: 'success',
- message: '鍒犻櫎鎴愬姛锛�',
- })
- })
- .catch(() => {
- ElMessage({
- type: 'info',
- message: '鍒犻櫎澶辫触',
- })
- })
-}
-const getTableRow = (row,type) =>{
- switch (type) {
- case 'edit' :{
- //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
- router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }})
- break
- }
- case 'delete':{
- alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
- break
- }
- }
-}
-
+ if (response.code === 200) {
+ ElMessage.success(response.message);
+ } else {
+ // 鍒犻櫎澶辫触锛屾偍鍙互澶勭悊閿欒鎴栨樉绀洪敊璇俊鎭粰鐢ㄦ埛
+ ElMessage.error(response.msg);
+ // alert('鍒犻櫎澶辫触锛�' + deleteResponse.message);
+ }
+ }
+ } catch (error) {
+ // 澶勭悊鍙兘鍑虹幇鐨勯敊璇紝姣斿 ElMessageBox 鎶涘嚭鐨勫紓甯哥瓑
+ console.error('鍙戠敓閿欒:', error);
+ }
+};
const gridOptions = reactive({
border: "full",//琛ㄦ牸鍔犺竟妗�
keepSource: true,//淇濇寔婧愭暟鎹�
@@ -150,19 +108,39 @@
<el-table height="240" ref="table"
@selection-change="handleSelectionChange"
:data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
- <el-table-column prop="id" align="center" label="鐜荤拑ID" min-width="80" />
- <el-table-column prop="sequence" align="center" label="浣嶇疆" min-width="120" />
+ <el-table-column prop="slot" align="center" label="鏍呮牸鍙�" min-width="80" />
+ <el-table-column prop="glass_id" align="center" label="鐜荤拑缂栧彿" min-width="80" />
<el-table-column prop="width" align="center" label="瀹�" min-width="120" />
- <el-table-column prop="height" align="center" label="闀�" min-width="120" />
+ <el-table-column prop="height" align="center" label="楂�" min-width="120" />
+ <el-table-column
+ align="center"
+ label="鍚敤鐘舵��"
+ min-width="80"
+ prop="enable_state"
+ >
+ <template #default="scope">
+ <el-tag type="success" >{{ scope.row.enable_state==1?"鍚敤":"鏈惎鐢�" }}</el-tag>
+ </template>
+ </el-table-column>
<el-table-column fixed="right" label="鎿嶄綔" align="center" width="200">
- <template #default>
- <el-button size="mini" type="text" plain @click="dialogForm">鎶ョ己</el-button>
+ <template #default="scope">
+ <!-- <el-button size="mini" type="text" plain @click="handleBindRacka(scope.row)">鎶ョ己</el-button> -->
+ <el-button size="mini" type="text" plain @click="open(scope.row)">鎶ョ己</el-button>
</template>
</el-table-column>
</el-table>
</div>
</el-card>
-
+ <!-- <el-dialog v-model="adda" top="30vh" width="25%" title="鏄惁鍒犻櫎璇ユ潯淇℃伅?" >
+ <template #footer>
+ <div id="dialog-footer">
+ <el-button type="primary" @click="handleConfirma">
+ 纭
+ </el-button>
+ <el-button @click="adda = false">鍙栨秷</el-button>
+ </div>
+ </template>
+ </el-dialog> -->
</div>
<div id="awatch">
<img src="../../assets/woshihuancun.png" alt="" style="width: 60%;height: 90%;margin-left: 260px;margin-top: 20px;">
--
Gitblit v1.8.0