| | |
| | | const {t} = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | const tableData = ref([]) |
| | | const blindb = ref(false) |
| | | const slot = ref('') |
| | | const requestData = { |
| | | line: 2001 |
| | |
| | | const handleMessage = (data) => { |
| | | tableData.value = data.edgTasks[0] |
| | | }; |
| | | // 历史任务 |
| | | const iframeUrl = ref(''); |
| | | const handlehistorical = (row) => { |
| | | blindb.value = true; |
| | | iframeUrl.value = `${window.location.origin}/#/StockBasicData/stockhistory`; |
| | | }; |
| | | onMounted(() => { |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | |
| | | closeWebSocket(socket); |
| | | } |
| | | }); |
| | | function getStatusTypeb(state) { |
| | | switch (state) { |
| | | case 0: |
| | | return 'info'; |
| | | case 1: |
| | | return 'success'; |
| | | case 1: |
| | | return 'danger'; |
| | | } |
| | | } |
| | | function getStatusTextb(state) { |
| | | switch (state) { |
| | | case 0: |
| | | return t('workOrder.nedging'); |
| | | case 1: |
| | | return t('workOrder.edging'); |
| | | case 2: |
| | | return t('workOrder.finedging'); |
| | | } |
| | | } |
| | | onBeforeUnmount(() => { |
| | | console.log("关闭了") |
| | | closeWebSocket(); |
| | |
| | | <div> |
| | | <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading"> |
| | | <div style="display: flex;"> |
| | | <el-button style="margin-left: 20px;" id="searchButton" type="success" @click="handlehistorical">{{ |
| | | $t('searchOrder.historicaltasks') |
| | | }} |
| | | </el-button> |
| | | <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-option :label="$t('workOrder.edgingone')" value="930"></el-option> |
| | | <el-option :label="$t('workOrder.edgingtwo')" value="931"></el-option> |
| | | </el-select> |
| | | <el-select v-model="selectValuesa[1]" filterable :placeholder="$t('workOrder.cstate')" clearable |
| | | style="margin-left: 20px;margin-bottom: 10px;"> |
| | |
| | | <el-table-column prop="thickness" align="center" :label="$t('workOrder.thickness')" min-width="120" /> |
| | | <el-table-column prop="glassType" align="center" :label="$t('workOrder.glasstype')" min-width="120" /> |
| | | <el-table-column prop="line" align="center" :label="$t('workOrder.line')" min-width="120" /> |
| | | <el-table-column prop="status" :label="$t('workOrder.status')" align="center" width="200"> |
| | | <template #default="scope"> |
| | | <el-table-column prop="state" :label="$t('workOrder.status')" align="center" width="200"> |
| | | <!-- <template #default="scope"> |
| | | {{ scope.row.status==0?"未磨边":scope.row.status==1?"磨边中":"已磨边" }} |
| | | </template> |
| | | </template> --> |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusTypeb(scope.row.state)"> |
| | | {{ getStatusTextb(scope.row.state) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" :label="$t('workOrder.operate')" align="center" width="200"> |
| | | <template #default="scope"> |
| | |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <!-- 历史任务 --> |
| | | <el-dialog v-model="blindb" top="10vh" width="90%"> |
| | | <iframe |
| | | :src="iframeUrl" |
| | | marginwidth="2000px" |
| | | marginheight="2000px" |
| | | width="100%" |
| | | height="700px" |
| | | frameborder="0" |
| | | ></iframe> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <style scoped> |