| | |
| | | } |
| | | }, |
| | | { |
| | | name: "æ å¨ å® æ", |
| | | name: "æå¨å®æ", |
| | | icon: '', |
| | | class: '', |
| | | value: 'TaskHandCompleted', |
| | |
| | | } |
| | | }, |
| | | { |
| | | name: "å æ¶ ä»» å¡", |
| | | name: "æå¨åæ¶", |
| | | icon: '', |
| | | class: '', |
| | | value: 'TaskHandCancel', |
| | |
| | | |
| | | const createSocket = (url) => { |
| | | // å建WebSocketè¿æ¥ |
| | | //"ws://127.0.0.1:9295/admin" |
| | | // url = "ws://127.0.0.1:9296"; |
| | | client = new WebSocket(url); |
| | | |
| | | client.onopen = function () { |
| | |
| | | } |
| | | } |
| | | |
| | | createSocket("ws://127.0.0.1:9296/" + _userInfo.userName); |
| | | // createSocket("ws://172.18.195.201:9296/" + _userInfo.userName); |
| | | |
| | | Object.assign(_config.$tabs, { open: open, close: close }); |
| | | |
| | |
| | | const loading = ref(false); |
| | | const codeImgSrc = ref(""); |
| | | const userInfo = reactive({ |
| | | userName: "admin", |
| | | userName: "sanyang", |
| | | password: "123456", |
| | | verificationCode: "1234", |
| | | UUID: undefined, |
| | |
| | | title: "ä»åºç¶æ", |
| | | field: "warehouseStatus", |
| | | type: "select", |
| | | dataKey: "enableEnum", |
| | | dataKey: "enableStatusEnum", |
| | | data: [], |
| | | }, |
| | | ], |
| | |
| | | sortName: "id", |
| | | }); |
| | | const editFormFields = ref({ |
| | | deviceCode: "", |
| | | deviceName: "", |
| | | deviceType: "", |
| | | deviceStatus: "", |
| | | deviceIp: "", |
| | | devicePort: "", |
| | | devicePlcType: "", |
| | | deviceRemark: "", |
| | | palletCode: "", |
| | | locationCode: "", |
| | | stockStatus: "", |
| | | palletType: "", |
| | | warehouseId: "", |
| | | roadway: "", |
| | | |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | | {field:'palletCode',title:'æçç¼å·',type:'string'}, |
| | | {field:'locationCode',title:'è´§ä½ç¼å·',type:'string'}, |
| | | {field: "stockStatus",title:'åºåç¶æ',type:'select',dataKey:'stockStatusEmun',data:[]} |
| | | ] |
| | | ]); |
| | | const searchFormFields = ref({ |
| | | palletCode: "", |
| | | locationCode: "", |
| | | roadway:"" |
| | | roadway: "", |
| | | warehouseId: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "æçç¼å·", field: "palletCode" ,type:'string'}, |
| | | { title: "è´§ä½ç¼å·", field: "locationCode",type:'string' }, |
| | | { title: "æçç¼å·", field: "palletCode" ,type:'like'}, |
| | | { title: "è´§ä½ç¼å·", field: "locationCode",type:'like' }, |
| | | { title: "å··éç¼å·", field: "roadway",type:'string' }, |
| | | { title: "ä»åº", field: "warehouseId",type:'select', dataKey: "warehousetype", data: [] } |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | |
| | | title: "æçç±»å", |
| | | type: "string", |
| | | width: 150, |
| | | align: "left", |
| | | align: "center", |
| | | sort:true, |
| | | bind: { key: "palltype", data: [] }, |
| | | formatter: (row) => { |
| | | if (row.warehouseId === 2) { |
| | | return "æå"; |
| | | } else { |
| | | return row.palletType == 1 ? "叿" : "æ¾å¸æ"; |
| | | } |
| | | } |
| | | },{ |
| | | field: "stockStatus", |
| | | title: "åºåç¶æ", |
| | |
| | | <div class="mian_log"> |
| | | <div class="log_tree"> |
| | | <div class="log_search"> |
| | | <el-input v-model.lazy="filterText" placeholder="请è¾å
¥æ¥è¯¢å
³é®å" clearable /> |
| | | <el-input v-model.lazy="filterText" placeholder="请è¾å
¥ç®å½åç§°" clearable /> |
| | | <el-button type="success" @click="ReloadTree()">å· æ°</el-button> |
| | | </div> |
| | | <el-tree class="log_el_tree" ref="treeRef" :data="treeData" :props="treeProps" :filter-node-method="treeFilter"> |
| | | <!-- æ·»å æ èç¹æç´¢ç»ææç¤º --> |
| | | <div class="search-tip" v-if="filterText && filteredCount !== null"> |
| | | æ¾å° {{ filteredCount }} 个å¹é
çç®å½ |
| | | </div> |
| | | <el-tree class="log_el_tree" ref="treeRef" :data="treeData" :props="treeProps" |
| | | :filter-node-method="treeFilter" node-key="dirPath" highlight-current> |
| | | <template #default="{ node, data }"> |
| | | <div class="treeItem"> |
| | | <div>{{ node.label }}</div> |
| | | <!-- é«äº®å¹é
çå
³é®å --> |
| | | <div v-html="highlightText(node.label)"></div> |
| | | <div style="padding-left: 10px;" v-if="isFile(data)"> |
| | | <a href="javascript:;" @click="GetContent(data)"> æå¼ </a> |
| | | <!-- ||<a href="javascript:;" @click="DonwLog(data)"> ä¸è½½ </a> --> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | <el-checkbox v-model="keepRead">ä¿æè¯»å</el-checkbox> |
| | | </div> |
| | | |
| | | <!-- æ·»å å
容æç´¢æ --> |
| | | <div class="content-search" v-if="content"> |
| | | <el-input v-model="contentSearchText" placeholder="卿¥å¿ä¸æç´¢..." size="small" clearable |
| | | @keyup.enter="searchInContent" /> |
| | | <el-button type="primary" size="small" @click="searchInContent">æç´¢</el-button> |
| | | <span v-if="searchResults.length > 0" class="search-info"> |
| | | {{ currentMatchIndex + 1 }}/{{ searchResults.length }} |
| | | </span> |
| | | <el-button v-if="searchResults.length > 0" type="info" size="small" |
| | | @click="prevMatch">ä¸ä¸å¤</el-button> |
| | | <el-button v-if="searchResults.length > 0" type="info" size="small" |
| | | @click="nextMatch">ä¸ä¸å¤</el-button> |
| | | </div> |
| | | |
| | | <div ref="pre" v-if="content"> |
| | | <el-progress :percentage="percentage" @click="ChangePercent($event)" color="#f56c6c" /> |
| | | </div> |
| | | <div ref="showdata" @scroll="handleScroll($event)" style="white-space: pre-wrap;word-break: break-all">{{ |
| | | content }}</div> |
| | | <!-- ä¿®æ¹å
容æ¾ç¤ºåºåï¼æ¯æé«äº® --> |
| | | <div ref="showdata" @scroll="handleScroll($event)" class="content-display" |
| | | v-html="highlightContent"></div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | content: "", |
| | | isClick: false, |
| | | |
| | | keepReadTimer: null |
| | | keepReadTimer: null, |
| | | |
| | | // æ°å¢æç´¢ç¸å
³å±æ§ |
| | | contentSearchText: "", |
| | | searchResults: [], |
| | | currentMatchIndex: -1, |
| | | searchHighlights: [], |
| | | filteredCount: null, |
| | | originalContent: "", // ä¿ååå§å
容ç¨äºæç´¢ |
| | | } |
| | | }, |
| | | watch: { |
| | | filterText(val) { |
| | | this.$refs.treeRef.filter(val) |
| | | this.updateFilteredCount() |
| | | }, |
| | | keepRead(val) { |
| | | if (val) { |
| | |
| | | this.percentage = 100; |
| | | this.http.post('/api/Sys_Log/GetLogData', parm).then((res) => { |
| | | this.content = res.data.content; |
| | | this.originalContent = res.data.content; |
| | | this.topStartPos = res.data.startIndex; |
| | | this.$nextTick(function () { |
| | | this.$refs.showdata.scrollTo(0, this.$refs.showdata.scrollHeight) |
| | | // éæ°åºç¨æç´¢é«äº® |
| | | if (this.contentSearchText) { |
| | | this.searchInContent(); |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | |
| | | } else { |
| | | clearInterval(this.keepReadTimer); |
| | | } |
| | | }, |
| | | content(newVal) { |
| | | this.originalContent = newVal; |
| | | if (this.contentSearchText) { |
| | | this.searchInContent(); |
| | | } else { |
| | | this.clearHighlights(); |
| | | } |
| | | } |
| | | }, |
| | | computed: { |
| | | // 计ç®é«äº®åçå
容 |
| | | highlightContent() { |
| | | if (!this.content || !this.contentSearchText || this.searchResults.length === 0) { |
| | | return this.content; |
| | | } |
| | | |
| | | let highlightedContent = this.content; |
| | | const searchText = this.contentSearchText.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); |
| | | const regex = new RegExp(`(${searchText})`, 'gi'); |
| | | |
| | | // 使ç¨å
¨å±æ¿æ¢æ·»å é«äº®æ è®° |
| | | highlightedContent = highlightedContent.replace(regex, (match, p1, offset) => { |
| | | // æ£æ¥æ¯å¦å½åå¹é
项 |
| | | const isCurrentMatch = this.searchResults.some((result, index) => |
| | | result.index === offset && index === this.currentMatchIndex |
| | | ); |
| | | |
| | | if (isCurrentMatch) { |
| | | return `<span class="highlight-current">${match}</span>`; |
| | | } else { |
| | | return `<span class="highlight">${match}</span>`; |
| | | } |
| | | }); |
| | | |
| | | return highlightedContent; |
| | | } |
| | | }, |
| | | methods: { |
| | | // æ èç¹è¿æ»¤æ¹æ³ |
| | | treeFilter(value, data) { |
| | | if (!value) return true |
| | | return data.dirName.includes(value) |
| | | return data.dirName.toLowerCase().includes(value.toLowerCase()) |
| | | }, |
| | | |
| | | // æ´æ°è¿æ»¤è®¡æ° |
| | | updateFilteredCount() { |
| | | if (!this.filterText) { |
| | | this.filteredCount = null; |
| | | return; |
| | | } |
| | | |
| | | // éå½è®¡ç®å¹é
çèç¹æ° |
| | | const countMatches = (nodes) => { |
| | | let count = 0; |
| | | for (const node of nodes) { |
| | | if (node.dirName.toLowerCase().includes(this.filterText.toLowerCase())) { |
| | | count++; |
| | | } |
| | | if (node.dirs && node.dirs.length) { |
| | | count += countMatches(node.dirs); |
| | | } |
| | | } |
| | | return count; |
| | | }; |
| | | |
| | | this.filteredCount = countMatches(this.treeData); |
| | | }, |
| | | |
| | | // é«äº®æ èç¹ä¸çææ¬ |
| | | highlightText(text) { |
| | | if (!this.filterText || !text) return text; |
| | | |
| | | const index = text.toLowerCase().indexOf(this.filterText.toLowerCase()); |
| | | if (index === -1) return text; |
| | | |
| | | const before = text.substring(0, index); |
| | | const match = text.substring(index, index + this.filterText.length); |
| | | const after = text.substring(index + this.filterText.length); |
| | | |
| | | return `${before}<span class="highlight">${match}</span>${after}`; |
| | | }, |
| | | |
| | | // å¨å
å®¹ä¸æç´¢ |
| | | searchInContent() { |
| | | if (!this.contentSearchText || !this.content) { |
| | | this.clearHighlights(); |
| | | return; |
| | | } |
| | | |
| | | const searchText = this.contentSearchText.toLowerCase(); |
| | | const content = this.content; |
| | | |
| | | // æ¥æ¾ææå¹é
项çä½ç½® |
| | | const results = []; |
| | | let index = content.toLowerCase().indexOf(searchText); |
| | | |
| | | while (index !== -1) { |
| | | results.push({ |
| | | index: index, |
| | | length: this.contentSearchText.length |
| | | }); |
| | | index = content.toLowerCase().indexOf(searchText, index + 1); |
| | | } |
| | | |
| | | this.searchResults = results; |
| | | |
| | | if (results.length > 0) { |
| | | this.currentMatchIndex = 0; |
| | | this.scrollToMatch(this.currentMatchIndex); |
| | | } else { |
| | | this.currentMatchIndex = -1; |
| | | this.$message.info('æªæ¾å°å¹é
å
容'); |
| | | } |
| | | }, |
| | | |
| | | // æ»å¨å°æå®å¹é
项 |
| | | scrollToMatch(matchIndex) { |
| | | if (matchIndex < 0 || matchIndex >= this.searchResults.length) return; |
| | | |
| | | const match = this.searchResults[matchIndex]; |
| | | const preContent = this.content.substring(0, match.index); |
| | | const lines = preContent.split('\n'); |
| | | |
| | | // 估计æ»å¨ä½ç½®ï¼ç®åçï¼ |
| | | const lineHeight = 20; // å设æ¯è¡é«åº¦ |
| | | const estimatedScrollTop = lines.length * lineHeight; |
| | | |
| | | this.$nextTick(() => { |
| | | this.$refs.showdata.scrollTop = estimatedScrollTop - 100; |
| | | }); |
| | | }, |
| | | |
| | | // ä¸ä¸å¤å¹é
|
| | | prevMatch() { |
| | | if (this.searchResults.length === 0) return; |
| | | this.currentMatchIndex = (this.currentMatchIndex - 1 + this.searchResults.length) % this.searchResults.length; |
| | | this.scrollToMatch(this.currentMatchIndex); |
| | | }, |
| | | |
| | | // ä¸ä¸å¤å¹é
|
| | | nextMatch() { |
| | | if (this.searchResults.length === 0) return; |
| | | this.currentMatchIndex = (this.currentMatchIndex + 1) % this.searchResults.length; |
| | | this.scrollToMatch(this.currentMatchIndex); |
| | | }, |
| | | |
| | | // æ¸
é¤é«äº® |
| | | clearHighlights() { |
| | | this.searchResults = []; |
| | | this.currentMatchIndex = -1; |
| | | }, |
| | | |
| | | isFile(data) { |
| | | if (data.dirPath) { |
| | | return data.dirPath.indexOf(".log") != -1 || data.dirPath.indexOf(".txt") != -1; |
| | |
| | | this.http.post('/api/Sys_Log/GetLogData', parm).then((res) => { |
| | | this.isClick = true; |
| | | this.content = res.data.content; |
| | | this.originalContent = res.data.content; |
| | | this.topStartPos = res.data.startIndex; |
| | | this.$nextTick(function () { |
| | | if (percent == 100) { |
| | |
| | | this.filePath = data.dirPath; |
| | | this.fileName = data.dirName; |
| | | this.percentage = parm.percent; |
| | | this.contentSearchText = ""; // æ¸
空æç´¢ |
| | | this.clearHighlights(); |
| | | |
| | | this.http.post('/api/Sys_Log/GetLogData', parm).then((res) => { |
| | | this.content = res.data.content; |
| | | this.originalContent = res.data.content; |
| | | this.topStartPos = res.data.startIndex; |
| | | this.fileSize = res.data.len; |
| | | this.$nextTick(function () { |
| | |
| | | this.percentage = 0.1; |
| | | } |
| | | this.content = res.data.content + this.content; |
| | | this.originalContent = res.data.content + this.originalContent; |
| | | this.$nextTick(function () { |
| | | this.$refs.showdata.scrollTo(0, 1) |
| | | // éæ°æç´¢ |
| | | if (this.contentSearchText) { |
| | | this.searchInContent(); |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | |
| | | this.http.post("/api/Sys_Log/GetLogList", {}, "å è½½ç®å½ä¸â¦â¦") |
| | | .then(res => { |
| | | this.treeData = res.data.dirs; |
| | | this.updateFilteredCount(); |
| | | }) |
| | | }, |
| | | GetSize(size) { |
| | |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .search-tip { |
| | | font-size: 12px; |
| | | color: #909399; |
| | | padding: 5px 0; |
| | | } |
| | | |
| | | .log_el_tree { |
| | | width: 100%; |
| | | overflow-x: auto; |
| | | flex: 1; |
| | | } |
| | | |
| | | |
| | | .treeItem { |
| | | overflow-x: auto; |
| | |
| | | } |
| | | |
| | | .treeItem::-webkit-scrollbar-thumb { |
| | | /* å®ä¹æ»å¨æ¡æ»åé¢è² */ |
| | | background: #ccc; |
| | | } |
| | | |
| | | .treeItem::-webkit-scrollbar-thumb:hover { |
| | | /* å®ä¹æ»å¨æ¡æ»åæ¬åé¢è² */ |
| | | background: orange; |
| | | } |
| | | |
| | |
| | | color: #bbb; |
| | | } |
| | | |
| | | .log_content>div:last-child { |
| | | .content-search { |
| | | display: flex; |
| | | gap: 5px; |
| | | align-items: center; |
| | | padding: 10px 0; |
| | | border-bottom: 1px solid #eee; |
| | | } |
| | | |
| | | .search-info { |
| | | font-size: 12px; |
| | | color: #666; |
| | | margin: 0 5px; |
| | | } |
| | | |
| | | .content-display { |
| | | flex: 1; |
| | | overflow-y: scroll; |
| | | margin-top: 5px; |
| | | padding-top: 5px; |
| | | border-top: 1px solid black; |
| | | white-space: pre-wrap; |
| | | word-break: break-all; |
| | | } |
| | | |
| | | a { |
| | | color: blue; |
| | | } |
| | | </style> |
| | | |
| | | :deep(.highlight) { |
| | | background-color: #ffeb3b; |
| | | color: #000; |
| | | padding: 0; |
| | | border-radius: 2px; |
| | | } |
| | | |
| | | :deep(.highlight-current) { |
| | | background-color: #ff9800; |
| | | color: #000; |
| | | padding: 0; |
| | | border-radius: 2px; |
| | | font-weight: bold; |
| | | } |
| | | </style> |
| | |
| | | |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions" |
| | | :table="table" :extend="extend"> |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | <script> |
| | | import extend from "@/extension/taskinfo/task.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | export default defineComponent({ |
| | |
| | | nextAddress: "", |
| | | creater: "", |
| | | createDate: "", |
| | | palletType:"", |
| | | WarehouseId:"", |
| | | palletType: "", |
| | | WarehouseId: "", |
| | | }); |
| | | const editFormOptions = ref([ |
| | | [ |
| | | { title: "ä»»å¡ç¶æ",field: "taskStatus",type: "select",dataKey: "taskStatusEnum",data: [],}, |
| | | { title: "ä»»å¡ç¶æ", field: "taskStatus", type: "select", dataKey: "taskStatusEnum", data: [], }, |
| | | ], |
| | | [ |
| | | { title: "èµ·å§å°å", field: "sourceAddress", type: "string" }, |
| | |
| | | ] |
| | | ]); |
| | | const searchFormFields = ref({ |
| | | taskId: "", |
| | | taskNum: "", |
| | | palletCode: "", |
| | | roadway: "", |
| | |
| | | targetAddress: "", |
| | | currentAddress: "", |
| | | nextAddress: "", |
| | | creater: "", |
| | | createDate: "", |
| | | }); |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "ä»»å¡å·", field: "taskNum", type: "int" }, |
| | | { title: "ä»»å¡å·", field: "taskId", type: "int" }, |
| | | { title: "MESå·", field: "taskNum", type: "like" }, |
| | | { title: "æçç¼å·", field: "palletCode", type: "like" }, |
| | | { title: "å建人", field: "creater", type: "like" }, |
| | | ], |
| | | [ |
| | | { title: "ä»»å¡ç±»å",field: "taskType",type: "selectList",dataKey: "taskType",data: [],}, |
| | | { title: "ä»»å¡ç¶æ",field: "taskStatus",type: "selectList",dataKey: "taskStatusEnum",data: [],}, |
| | | { title: "ä»»å¡ç±»å", field: "taskType", type: "selectList", dataKey: "taskTypeEnum", data: [], }, |
| | | { title: "ä»»å¡ç¶æ", field: "taskStatus", type: "selectList", dataKey: "taskStatusEnum", data: [], }, |
| | | { title: "å··éå·", field: "roadway", type: "like" }, |
| | | ], |
| | | [ |
| | | { title: "èµ·å§å°å", field: "sourceAddress", type: "like" }, |
| | | { title: "ç®æ å°å", field: "targetAddress", type: "like" }, |
| | | { title: "å建æ¶é´", field: "createDate", type: "datetime" }, |
| | | { title: "ä»åº", field: "warehouseId", type: "selectList", dataKey: "warehouseEnum", data: [], }, |
| | | ], |
| | | ]); |
| | | const columns = ref([ |
| | |
| | | title: "æçç±»å", |
| | | type: "string", |
| | | width: 80, |
| | | align: "left", |
| | | bind: { key: "taskpalltype", data: [] }, |
| | | align: "center", |
| | | formatter: (row) => { |
| | | if (row.warehouseId === 2) { |
| | | return "æå"; |
| | | } else { |
| | | return row.palletType == 1 ? "叿" : "æ¾å¸æ"; |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | field: "roadway", |
| | |
| | | type: "string", |
| | | width: 70, |
| | | align: "left", |
| | | },{ |
| | | }, { |
| | | field: "warehouseId", |
| | | title: "ä»åºç¼å·", |
| | | type: "int", |
| | |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "numberSsuances", |
| | | title: "å¼å¸¸æ¬¡æ°", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | |
| | | title: "ä»»å¡ä¸åæ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | hidden:true, |
| | | }, |
| | | { |
| | | field: "wMSId", |
| | | title: "WMSä»»å¡ä¸»é®", |
| | | type: "int", |
| | | width: 120, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | |
| | | |
| | | ]); |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |
| | | </script> |
| | |
| | | |
| | | <template> |
| | | <view-grid |
| | | ref="grid" |
| | | :columns="columns" |
| | | :detail="detail" |
| | | :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" |
| | | :searchFormFields="searchFormFields" |
| | | :searchFormOptions="searchFormOptions" |
| | | :table="table" |
| | | :extend="extend" |
| | | > |
| | | <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" |
| | | :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions" |
| | | :table="table" :extend="extend"> |
| | | </view-grid> |
| | | </template> |
| | | <script> |
| | | <script> |
| | | import extend from "@/extension/taskinfo/task_hty.js"; |
| | | import { ref, defineComponent } from "vue"; |
| | | import { ref, defineComponent, computed } from "vue"; |
| | | export default defineComponent({ |
| | | setup() { |
| | | const getPalletTypeLabel = (warehouseId, palletType) => { |
| | | if (warehouseId === 2) { |
| | | return "æå"; |
| | | } else { |
| | | return palletType === 1 ? "叿" : "æ¾å¸æ"; |
| | | } |
| | | }; |
| | | |
| | | const table = ref({ |
| | | key: "taskId", |
| | | footer: "Foots", |
| | |
| | | url: "/Task_Hty/", |
| | | sortName: "taskId", |
| | | }); |
| | | |
| | | const editFormFields = ref({}); |
| | | const editFormOptions = ref([]); |
| | | |
| | | const searchFormFields = ref({ |
| | | sourceId: "", |
| | | taskNum: "", |
| | | palletCode: "", |
| | | roadway: "", |
| | |
| | | targetAddress: "", |
| | | currentAddress: "", |
| | | nextAddress: "", |
| | | createDate: "", |
| | | warehouseId: "", |
| | | creater: "", |
| | | createDate: "", |
| | | }); |
| | | |
| | | const searchFormOptions = ref([ |
| | | [ |
| | | { title: "ä»»å¡å·", field: "taskNum", type: "int" }, |
| | | [ |
| | | { title: "ä»»å¡å·", field: "sourceId", type: "int" }, |
| | | { title: "MESå·", field: "taskNum", type: "like" }, |
| | | { title: "æçç¼å·", field: "palletCode", type: "like" }, |
| | | { title: "å建人", field: "creater", type: "like" }, |
| | | ], |
| | | [ |
| | | { title: "ä»»å¡ç±»å",field: "taskType",type: "selectList",dataKey: "taskType",data: [],}, |
| | | { title: "ä»»å¡ç¶æ",field: "taskStatus",type: "selectList",dataKey: "taskStatusEnum",data: [],}, |
| | | { title: "ä»»å¡ç±»å", field: "taskType", type: "selectList", dataKey: "taskTypeEnum", data: [], }, |
| | | { title: "ä»»å¡ç¶æ", field: "taskStatus", type: "selectList", dataKey: "taskStatusEnum", data: [], }, |
| | | { title: "å··éå·", field: "roadway", type: "like" }, |
| | | ], |
| | | [ |
| | | { title: "èµ·å§å°å", field: "sourceAddress", type: "like" }, |
| | | { title: "ç®æ å°å", field: "targetAddress", type: "like" }, |
| | | { title: "å建æ¶é´", field: "createDate", type: "datetime" }, |
| | | { title: "ä»åº", field: "warehouseId", type: "selectList", dataKey: "warehouseEnum", data: [], }, |
| | | ], |
| | | [ |
| | | { title: "å建人", field: "creater", type: "like" }, |
| | | { title: "å建æ¶é´", field: "createDate", type: "datetime" }, |
| | | ] |
| | | ]); |
| | | |
| | | const columns = ref([ |
| | | { |
| | | field: "taskId", |
| | |
| | | title: "æçç±»å", |
| | | type: "string", |
| | | width: 80, |
| | | align: "left", |
| | | bind: { key: "taskhtypalltype", data: [] }, |
| | | align: "center", |
| | | formatter: (row) => { |
| | | if (row.warehouseId === 2) { |
| | | return "æå"; |
| | | } else { |
| | | return row.palletType == 1 ? "叿" : "æ¾å¸æ"; |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | field: "warehouseId", |
| | |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "numberSsuances", |
| | | title: "å¼å¸¸æ¬¡æ°", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | { |
| | | field: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 100, |
| | | align: "left", |
| | | }, |
| | | // { |
| | | // field: "grade", |
| | | // title: "ä¼å
级", |
| | | // type: "int", |
| | | // width: 80, |
| | | // align: "left", |
| | | // }, |
| | | { |
| | | field: "dispatchertime", |
| | | title: "ä»»å¡ä¸åæ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | align: "left", |
| | | hidden:true, |
| | | }, |
| | | { |
| | | field: "wMSId", |
| | | title: "WMSä»»å¡ä¸»é®", |
| | | type: "int", |
| | | width: 120, |
| | | align: "left", |
| | | hidden: true, |
| | | }, |
| | | // { |
| | | // field: "creater", |
| | | // title: "å建人", |
| | | // type: "string", |
| | | // width: 90, |
| | | // align: "left", |
| | | // }, |
| | | { |
| | | field: "createDate", |
| | | title: "å建æ¶é´", |
| | |
| | | width: 160, |
| | | align: "left", |
| | | }, |
| | | // { |
| | | // field: "modifier", |
| | | // title: "ä¿®æ¹äºº", |
| | | // type: "string", |
| | | // width: 100, |
| | | // align: "left", |
| | | // }, |
| | | // { |
| | | // field: "modifyDate", |
| | | // title: "ä¿®æ¹æ¶é´", |
| | | // type: "datetime", |
| | | // width: 160, |
| | | // align: "left", |
| | | // }, |
| | | |
| | | ]); |
| | | |
| | | const detail = ref({ |
| | | cnName: "#detailCnName", |
| | | table: "", |
| | | columns: [], |
| | | sortName: "", |
| | | }); |
| | | |
| | | return { |
| | | table, |
| | | extend, |
| | |
| | | }; |
| | | }, |
| | | }); |
| | | </script> |
| | | |
| | | </script> |