wangfei
2024-10-21 07b0cdcb34db682b51ca972f5c23da653aa5d32d
UI-Project/src/views/StockBasicData/stockBasicData.vue
@@ -14,7 +14,7 @@
  import { useI18n } from 'vue-i18n'
  const { t } = useI18n()
  let language = ref(localStorage.getItem('lang') || 'zh')
const tableData = ref([])
const slot = ref('')
const requestData = {  
@@ -24,7 +24,7 @@
const selectValuesa = reactive([]);
// request.post("/cacheGlass/taskCache/selectEdgTask",{
//   ...requestData,  
// }).then((res) => {
//           if (res.code == 200) {
            
@@ -36,7 +36,7 @@
        
//           }
//           });
// 磨边任务查询
const setEdgGlassInfoRequest = async () => {
  let celllist=[]
@@ -63,9 +63,9 @@
  } else {
    ElMessage.error(response.message);
  }
}
// 破损
 const open = async(row) => { 
  try {
@@ -84,7 +84,7 @@
        glassId: row.glassId,
        state: 8,
        line: row.line,
        workingProcedure: '冷加工',
        workingProcedure: '磨边',
    })
    if (response.code === 200) {
      ElMessage.success(response.message);
@@ -117,7 +117,7 @@
        glassId: row.glassId,
        state: 9,
        line: row.line,
        workingProcedure: '冷加工',
        workingProcedure: '磨边',
    })
    if (response.code === 200) {
      ElMessage.success(response.message);
@@ -133,7 +133,7 @@
  }  
};   
let socket = null;
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/cacheGlass`;
const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/edgTasks`;
// 定义消息处理函数,更新 receivedData 变量
const handleMessage = (data) => {
  // 更新 tableData 的数据
@@ -155,25 +155,25 @@
<template>
  <div>
    <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
      <el-select v-model="selectValuesa[0]" filterable :placeholder="$t('请选择线路')" clearable style="margin-left: 20px;margin-bottom: 10px;">
            <el-option label="磨边一线" value="2001"></el-option>
            <el-option label="磨边二线" value="2002"></el-option>
      <el-select v-model="selectValuesa[0]" filterable :placeholder="$t('workOrder.cway')" clearable style="margin-left: 20px;margin-bottom: 10px;">
            <el-option :label="$t('workOrder.edgingone')" value="2001"></el-option>
            <el-option :label="$t('workOrder.edgingtwo')" value="2002"></el-option>
          </el-select>
          <el-select v-model="selectValuesa[1]" filterable :placeholder="$t('请选择状态')" clearable style="margin-left: 20px;margin-bottom: 10px;" >
            <el-option label="未磨边" value="0"></el-option>
            <el-option label="磨边中" value="1"></el-option>
            <el-option label="已磨边" value="2"></el-option>
          <el-select v-model="selectValuesa[1]" filterable :placeholder="$t('workOrder.cstate')" clearable style="margin-left: 20px;margin-bottom: 10px;" >
            <el-option :label="$t('workOrder.nedging')" value="0"></el-option>
            <el-option :label="$t('workOrder.edging')" value="1"></el-option>
            <el-option :label="$t('workOrder.finedging')" value="2"></el-option>
          </el-select>
          <span class="demonstration" style="margin-left: 20px;margin-bottom: 10px;">时间段</span>
            <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" start-placeholder="开始日期"  style="margin-left: 20px;margin-bottom: 10px;" value-format = "YYYY-MM-DD hh:mm:ss"
          <span class="demonstration" style="margin-left: 20px;margin-bottom: 10px;">{{ $t('workOrder.time') }}</span>
            <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')"  style="margin-left: 20px;margin-bottom: 10px;" value-format = "YYYY-MM-DD hh:mm:ss"
            
              end-placeholder="结束日期">
              :end-placeholder="$t('reportmanage.endtime')">
            </el-date-picker>
          <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="setEdgGlassInfoRequest()">{{
        $t('reportmanage.inquire')
      }}</el-button>
      <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
        <el-table height="750" ref="table" 
        @selection-change="handleSelectionChange"
@@ -189,8 +189,8 @@
              {{ scope.row.status==0?"未磨边":scope.row.status==1?"磨边中":"已磨边" }}
            </template>
        </el-table-column>
          <el-table-column fixed="right" :label="$t('workOrder.operate')" align="center" width="200">
            <template #default="scope">
              <el-button size="mini" type="text" plain @click="open(scope.row)">{{ $t('workOrder.breakage') }}</el-button>
@@ -202,7 +202,7 @@
    </el-card>
  </div>
</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%;}