Commit 8160387437fca829f30108c37ee21dc2570d5bc6
1 parent
7807abcf
任务状态高亮
Showing
3 changed files
with
242 additions
and
183 deletions
ant-design-vue-jeecg/src/views/system/task/AgvTaskList.vue
@@ -49,24 +49,26 @@ | @@ -49,24 +49,26 @@ | ||
49 | <!-- 操作按钮区域 --> | 49 | <!-- 操作按钮区域 --> |
50 | <div class="table-operator"> | 50 | <div class="table-operator"> |
51 | <a-button v-has="'agvTask:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> | 51 | <a-button v-has="'agvTask:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> |
52 | - <a-button v-has="'agvTask:export'" type="primary" icon="download" @click="handleExportXls('AGV任务')">导出</a-button> | ||
53 | - <a-upload v-has="'agvTask:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> | 52 | + <a-button v-has="'agvTask:export'" type="primary" icon="download" @click="handleExportXls('AGV任务')">导出 |
53 | + </a-button> | ||
54 | + <a-upload v-has="'agvTask:import'" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" | ||
55 | + :action="importExcelUrl" @change="handleImportExcel"> | ||
54 | <a-button type="primary" icon="import">导入</a-button> | 56 | <a-button type="primary" icon="import">导入</a-button> |
55 | </a-upload> | 57 | </a-upload> |
56 | -<!-- <a-dropdown v-if="selectedRowKeys.length > 0">--> | ||
57 | -<!-- <a-menu slot="overlay">--> | ||
58 | -<!-- <a-menu-item key="1" v-has="'agvTask:delete'" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>--> | ||
59 | -<!-- </a-menu>--> | ||
60 | -<!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>--> | ||
61 | -<!-- </a-dropdown>--> | 58 | + <!-- <a-dropdown v-if="selectedRowKeys.length > 0">--> |
59 | + <!-- <a-menu slot="overlay">--> | ||
60 | + <!-- <a-menu-item key="1" v-has="'agvTask:delete'" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>--> | ||
61 | + <!-- </a-menu>--> | ||
62 | + <!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>--> | ||
63 | + <!-- </a-dropdown>--> | ||
62 | </div> | 64 | </div> |
63 | 65 | ||
64 | <!-- table区域-begin --> | 66 | <!-- table区域-begin --> |
65 | <div> | 67 | <div> |
66 | -<!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> | ||
67 | -<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项--> | ||
68 | -<!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> | ||
69 | -<!-- </div>--> | 68 | + <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> |
69 | + <!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a> 项--> | ||
70 | + <!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> | ||
71 | + <!-- </div>--> | ||
70 | 72 | ||
71 | <a-table | 73 | <a-table |
72 | ref="table" | 74 | ref="table" |
@@ -81,12 +83,20 @@ | @@ -81,12 +83,20 @@ | ||
81 | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | 83 | :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
82 | class="j-table-force-nowrap" | 84 | class="j-table-force-nowrap" |
83 | @change="handleTableChange"> | 85 | @change="handleTableChange"> |
86 | + | ||
87 | + <span slot="status_dictText" slot-scope="status_dictText"> | ||
88 | + <a-tag :key="status_dictText" :color="getStatusColor(status_dictText)"> | ||
89 | + {{ status_dictText }} | ||
90 | + </a-tag> | ||
91 | + </span> | ||
92 | + | ||
84 | <template slot="htmlSlot" slot-scope="text"> | 93 | <template slot="htmlSlot" slot-scope="text"> |
85 | <div v-html="text"></div> | 94 | <div v-html="text"></div> |
86 | </template> | 95 | </template> |
87 | <template slot="imgSlot" slot-scope="text"> | 96 | <template slot="imgSlot" slot-scope="text"> |
88 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | 97 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
89 | - <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> | 98 | + <img v-else :src="getImgView(text)" height="25px" alt="" |
99 | + style="max-width:80px;font-size: 12px;font-style: italic;"/> | ||
90 | </template> | 100 | </template> |
91 | <template slot="fileSlot" slot-scope="text"> | 101 | <template slot="fileSlot" slot-scope="text"> |
92 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | 102 | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
@@ -101,12 +111,14 @@ | @@ -101,12 +111,14 @@ | ||
101 | </template> | 111 | </template> |
102 | 112 | ||
103 | <span slot="action" slot-scope="text, record"> | 113 | <span slot="action" slot-scope="text, record"> |
104 | - <a v-if="record.status == 1" v-has="'agvTask:executeTask'" @click="executeAgvTask(record)">执行<a-divider type="vertical"/></a> | ||
105 | - <a-popconfirm v-if="record.status < 100" title="确定删除吗?" v-has="'agvTask:delete'" @confirm="() => handleDelete(record.id)"> | 114 | + <a v-if="record.status == 1" v-has="'agvTask:executeTask'" @click="executeAgvTask(record)">执行<a-divider |
115 | + type="vertical"/></a> | ||
116 | + <a-popconfirm v-if="record.status < 100" title="确定删除吗?" v-has="'agvTask:delete'" | ||
117 | + @confirm="() => handleDelete(record.id)"> | ||
106 | <a>删除 <a-divider type="vertical"/></a> | 118 | <a>删除 <a-divider type="vertical"/></a> |
107 | </a-popconfirm> | 119 | </a-popconfirm> |
108 | <a-dropdown> | 120 | <a-dropdown> |
109 | - <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> | 121 | + <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
110 | <a-menu slot="overlay"> | 122 | <a-menu slot="overlay"> |
111 | <a-menu-item> | 123 | <a-menu-item> |
112 | <a @click="handleDetail(record)">详情</a> | 124 | <a @click="handleDetail(record)">详情</a> |
@@ -127,181 +139,193 @@ | @@ -127,181 +139,193 @@ | ||
127 | 139 | ||
128 | <script> | 140 | <script> |
129 | 141 | ||
130 | - import '@/assets/less/TableExpand.less' | ||
131 | - import { mixinDevice } from '@/utils/mixin' | ||
132 | - import { JeecgListMixin } from '@/mixins/JeecgListMixin' | ||
133 | - import AgvTaskModal from './modules/AgvTaskModal' | ||
134 | - import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | ||
135 | - import {executeAgv} from '@/api/api' | ||
136 | - import {completeAgv, cancelAgv} from '@/api/api' | 142 | +import '@/assets/less/TableExpand.less' |
143 | +import {mixinDevice} from '@/utils/mixin' | ||
144 | +import {JeecgListMixin} from '@/mixins/JeecgListMixin' | ||
145 | +import AgvTaskModal from './modules/AgvTaskModal' | ||
146 | +import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | ||
147 | +import {executeAgv} from '@/api/api' | ||
148 | +import {completeAgv, cancelAgv} from '@/api/api' | ||
137 | 149 | ||
138 | - export default { | ||
139 | - name: 'AgvTaskList', | ||
140 | - mixins:[JeecgListMixin, mixinDevice], | ||
141 | - components: { | ||
142 | - AgvTaskModal | ||
143 | - }, | ||
144 | - data () { | ||
145 | - return { | ||
146 | - description: 'AGV任务管理页面', | ||
147 | - isorter: { | ||
148 | - column: 'status', | ||
149 | - order: 'asc', | 150 | +export default { |
151 | + name: 'AgvTaskList', | ||
152 | + mixins: [JeecgListMixin, mixinDevice], | ||
153 | + components: { | ||
154 | + AgvTaskModal | ||
155 | + }, | ||
156 | + data() { | ||
157 | + return { | ||
158 | + description: 'AGV任务管理页面', | ||
159 | + isorter: { | ||
160 | + column: 'status', | ||
161 | + order: 'asc', | ||
162 | + }, | ||
163 | + // 表头 | ||
164 | + columns: [ | ||
165 | + { | ||
166 | + title: '任务ID', | ||
167 | + align: "center", | ||
168 | + dataIndex: 'id', | ||
169 | + sorter: true, | ||
150 | }, | 170 | }, |
151 | - // 表头 | ||
152 | - columns: [ | ||
153 | - { | ||
154 | - title: '任务ID', | ||
155 | - align: "center", | ||
156 | - dataIndex: 'id', | ||
157 | - sorter: true, | ||
158 | - }, | ||
159 | - { | ||
160 | - title:'任务类型', | ||
161 | - align:"center", | ||
162 | - dataIndex: 'taskType_dictText' | ||
163 | - }, | ||
164 | - { | ||
165 | - title:'容器编码', | ||
166 | - align:"center", | ||
167 | - dataIndex: 'containerCode' | ||
168 | - }, | ||
169 | - { | ||
170 | - title:'小车编码', | ||
171 | - align:"center", | ||
172 | - dataIndex: 'carno' | ||
173 | - }, | ||
174 | - { | ||
175 | - title:'优先级', | ||
176 | - align:"center", | ||
177 | - dataIndex: 'priority' | ||
178 | - }, | ||
179 | - { | ||
180 | - title:'状态', | ||
181 | - align:"center", | ||
182 | - dataIndex: 'status_dictText' | ||
183 | - }, | ||
184 | - { | ||
185 | - title:'起始点位', | ||
186 | - align:"center", | ||
187 | - dataIndex: 'fromPort' | ||
188 | - }, | ||
189 | - { | ||
190 | - title:'目标点位', | ||
191 | - align:"center", | ||
192 | - dataIndex: 'toPort' | ||
193 | - }, | ||
194 | - { | ||
195 | - title:'创建人', | ||
196 | - align:"center", | ||
197 | - dataIndex: 'createBy' | ||
198 | - }, | ||
199 | - { | ||
200 | - title:'创建日期', | ||
201 | - align:"center", | ||
202 | - dataIndex: 'createTime' | ||
203 | - }, | ||
204 | - { | ||
205 | - title:'更新人', | ||
206 | - align:"center", | ||
207 | - dataIndex: 'updateBy' | ||
208 | - }, | ||
209 | - { | ||
210 | - title:'更新日期', | ||
211 | - align:"center", | ||
212 | - dataIndex: 'updateTime' | ||
213 | - }, | ||
214 | - { | ||
215 | - title: '操作', | ||
216 | - dataIndex: 'action', | ||
217 | - align:"center", | ||
218 | - fixed:"right", | ||
219 | - width:147, | ||
220 | - scopedSlots: { customRender: 'action' } | ||
221 | - } | ||
222 | - ], | ||
223 | - url: { | ||
224 | - list: "/task/agvTask/list", | ||
225 | - delete: "/task/agvTask/delete", | ||
226 | - deleteBatch: "/task/agvTask/deleteBatch", | ||
227 | - exportXlsUrl: "/task/agvTask/exportXls", | ||
228 | - importExcelUrl: "task/agvTask/importExcel", | ||
229 | - | 171 | + { |
172 | + title: '任务类型', | ||
173 | + align: "center", | ||
174 | + dataIndex: 'taskType_dictText' | ||
230 | }, | 175 | }, |
231 | - dictOptions:{}, | ||
232 | - superFieldList:[], | ||
233 | - } | ||
234 | - }, | ||
235 | - created() { | 176 | + { |
177 | + title: '容器编码', | ||
178 | + align: "center", | ||
179 | + dataIndex: 'containerCode' | ||
180 | + }, | ||
181 | + { | ||
182 | + title: '小车编码', | ||
183 | + align: "center", | ||
184 | + dataIndex: 'carno' | ||
185 | + }, | ||
186 | + { | ||
187 | + title: '优先级', | ||
188 | + align: "center", | ||
189 | + dataIndex: 'priority' | ||
190 | + }, | ||
191 | + { | ||
192 | + title: '任务状态', | ||
193 | + align: "center", | ||
194 | + dataIndex: 'status_dictText', | ||
195 | + scopedSlots: {customRender: 'status_dictText'} | ||
196 | + }, | ||
197 | + { | ||
198 | + title: '起始点位', | ||
199 | + align: "center", | ||
200 | + dataIndex: 'fromPort' | ||
201 | + }, | ||
202 | + { | ||
203 | + title: '目标点位', | ||
204 | + align: "center", | ||
205 | + dataIndex: 'toPort' | ||
206 | + }, | ||
207 | + { | ||
208 | + title: '创建人', | ||
209 | + align: "center", | ||
210 | + dataIndex: 'createBy' | ||
211 | + }, | ||
212 | + { | ||
213 | + title: '创建日期', | ||
214 | + align: "center", | ||
215 | + dataIndex: 'createTime' | ||
216 | + }, | ||
217 | + { | ||
218 | + title: '更新人', | ||
219 | + align: "center", | ||
220 | + dataIndex: 'updateBy' | ||
221 | + }, | ||
222 | + { | ||
223 | + title: '更新日期', | ||
224 | + align: "center", | ||
225 | + dataIndex: 'updateTime' | ||
226 | + }, | ||
227 | + { | ||
228 | + title: '操作', | ||
229 | + dataIndex: 'action', | ||
230 | + align: "center", | ||
231 | + fixed: "right", | ||
232 | + width: 147, | ||
233 | + scopedSlots: {customRender: 'action'} | ||
234 | + } | ||
235 | + ], | ||
236 | + url: { | ||
237 | + list: "/task/agvTask/list", | ||
238 | + delete: "/task/agvTask/delete", | ||
239 | + deleteBatch: "/task/agvTask/deleteBatch", | ||
240 | + exportXlsUrl: "/task/agvTask/exportXls", | ||
241 | + importExcelUrl: "task/agvTask/importExcel", | ||
242 | + | ||
243 | + }, | ||
244 | + dictOptions: {}, | ||
245 | + superFieldList: [], | ||
246 | + } | ||
247 | + }, | ||
248 | + created() { | ||
236 | this.getSuperFieldList(); | 249 | this.getSuperFieldList(); |
250 | + }, | ||
251 | + computed: { | ||
252 | + importExcelUrl: function () { | ||
253 | + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | ||
237 | }, | 254 | }, |
238 | - computed: { | ||
239 | - importExcelUrl: function(){ | ||
240 | - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | ||
241 | - }, | 255 | + }, |
256 | + methods: { | ||
257 | + getStatusColor(status) { | ||
258 | + const colors = { | ||
259 | + '生成任务': 'green', | ||
260 | + '下发任务': 'blue', | ||
261 | + '开始执行': 'orange', | ||
262 | + '取货完成': 'purple', | ||
263 | + '任务完成': 'grey', | ||
264 | + default: 'default' | ||
265 | + }; | ||
266 | + return colors[status] || colors.default; | ||
242 | }, | 267 | }, |
243 | - methods: { | ||
244 | - initDictConfig(){ | ||
245 | - }, | ||
246 | - executeAgvTask(record) { | ||
247 | - this.loading = true; | ||
248 | - this.model = Object.assign({}, record); | ||
249 | - executeAgv(this.model.id).then((res) => { | ||
250 | - this.loading = false; | ||
251 | - if (res.success) { | ||
252 | - this.$message.success(res.message); | ||
253 | - } else { | ||
254 | - this.$message.error(res.message); | ||
255 | - } | ||
256 | - this.searchQuery(); | ||
257 | - }); | ||
258 | - }, | ||
259 | - completeAgvTask(record) { | ||
260 | - this.loading = true; | ||
261 | - this.model = Object.assign({}, record); | ||
262 | - completeAgv(this.model.id).then((res) => { | ||
263 | - this.loading = false; | ||
264 | - if (res.success) { | ||
265 | - this.$message.success(res.message); | ||
266 | - } else { | ||
267 | - this.$message.error(res.message); | ||
268 | - } | ||
269 | - this.searchQuery(); | ||
270 | - }); | ||
271 | - }, | ||
272 | - cancelAgvTask(record) { | ||
273 | - this.loading = true; | ||
274 | - this.model = Object.assign({}, record); | ||
275 | - cancelAgv(this.model.id).then((res) => { | ||
276 | - this.loading = false; | ||
277 | - if (res.success) { | ||
278 | - this.$message.success(res.message); | ||
279 | - } else { | ||
280 | - this.$message.error(res.message); | ||
281 | - } | ||
282 | - this.searchQuery(); | ||
283 | - }); | ||
284 | - }, | ||
285 | - getSuperFieldList(){ | ||
286 | - let fieldList=[]; | ||
287 | - fieldList.push({type:'string',value:'warehouseCode',text:'仓库编码',dictCode:''}) | ||
288 | - fieldList.push({type:'string',value:'zoneCode',text:'库区',dictCode:''}) | ||
289 | - fieldList.push({type:'int',value:'taskType',text:'任务类型',dictCode:'agv_task_type'}) | ||
290 | - fieldList.push({type:'string',value:'containerCode',text:'容器编码',dictCode:''}) | ||
291 | - fieldList.push({type:'string',value:'carno',text:'小车编码',dictCode:''}) | ||
292 | - fieldList.push({type:'int',value:'priority',text:'优先级',dictCode:''}) | ||
293 | - fieldList.push({type:'int',value:'status',text:'状态',dictCode:'agv_task_status'}) | ||
294 | - fieldList.push({type:'string',value:'fromPort',text:'起始点位',dictCode:''}) | ||
295 | - fieldList.push({type:'string',value:'toPort',text:'目标点位',dictCode:''}) | ||
296 | - fieldList.push({type:'string',value:'createBy',text:'创建人',dictCode:''}) | ||
297 | - fieldList.push({type:'datetime',value:'createTime',text:'创建日期'}) | ||
298 | - fieldList.push({type:'string',value:'updateBy',text:'更新人',dictCode:''}) | ||
299 | - fieldList.push({type:'datetime',value:'updateTime',text:'更新日期'}) | ||
300 | - this.superFieldList = fieldList | ||
301 | - } | 268 | + initDictConfig() { |
269 | + }, | ||
270 | + executeAgvTask(record) { | ||
271 | + this.loading = true; | ||
272 | + this.model = Object.assign({}, record); | ||
273 | + executeAgv(this.model.id).then((res) => { | ||
274 | + this.loading = false; | ||
275 | + if (res.success) { | ||
276 | + this.$message.success(res.message); | ||
277 | + } else { | ||
278 | + this.$message.error(res.message); | ||
279 | + } | ||
280 | + this.searchQuery(); | ||
281 | + }); | ||
282 | + }, | ||
283 | + completeAgvTask(record) { | ||
284 | + this.loading = true; | ||
285 | + this.model = Object.assign({}, record); | ||
286 | + completeAgv(this.model.id).then((res) => { | ||
287 | + this.loading = false; | ||
288 | + if (res.success) { | ||
289 | + this.$message.success(res.message); | ||
290 | + } else { | ||
291 | + this.$message.error(res.message); | ||
292 | + } | ||
293 | + this.searchQuery(); | ||
294 | + }); | ||
295 | + }, | ||
296 | + cancelAgvTask(record) { | ||
297 | + this.loading = true; | ||
298 | + this.model = Object.assign({}, record); | ||
299 | + cancelAgv(this.model.id).then((res) => { | ||
300 | + this.loading = false; | ||
301 | + if (res.success) { | ||
302 | + this.$message.success(res.message); | ||
303 | + } else { | ||
304 | + this.$message.error(res.message); | ||
305 | + } | ||
306 | + this.searchQuery(); | ||
307 | + }); | ||
308 | + }, | ||
309 | + getSuperFieldList() { | ||
310 | + let fieldList = []; | ||
311 | + fieldList.push({type: 'string', value: 'warehouseCode', text: '仓库编码', dictCode: ''}) | ||
312 | + fieldList.push({type: 'string', value: 'zoneCode', text: '库区', dictCode: ''}) | ||
313 | + fieldList.push({type: 'int', value: 'taskType', text: '任务类型', dictCode: 'agv_task_type'}) | ||
314 | + fieldList.push({type: 'string', value: 'containerCode', text: '容器编码', dictCode: ''}) | ||
315 | + fieldList.push({type: 'string', value: 'carno', text: '小车编码', dictCode: ''}) | ||
316 | + fieldList.push({type: 'int', value: 'priority', text: '优先级', dictCode: ''}) | ||
317 | + fieldList.push({type: 'int', value: 'status', text: '状态', dictCode: 'agv_task_status'}) | ||
318 | + fieldList.push({type: 'string', value: 'fromPort', text: '起始点位', dictCode: ''}) | ||
319 | + fieldList.push({type: 'string', value: 'toPort', text: '目标点位', dictCode: ''}) | ||
320 | + fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''}) | ||
321 | + fieldList.push({type: 'datetime', value: 'createTime', text: '创建日期'}) | ||
322 | + fieldList.push({type: 'string', value: 'updateBy', text: '更新人', dictCode: ''}) | ||
323 | + fieldList.push({type: 'datetime', value: 'updateTime', text: '更新日期'}) | ||
324 | + this.superFieldList = fieldList | ||
302 | } | 325 | } |
303 | } | 326 | } |
327 | +} | ||
304 | </script> | 328 | </script> |
305 | <style scoped> | 329 | <style scoped> |
306 | - @import '~@assets/less/common.less'; | 330 | +@import '~@assets/less/common.less'; |
307 | </style> | 331 | </style> |
308 | \ No newline at end of file | 332 | \ No newline at end of file |
ant-design-vue-jeecg/src/views/system/task/CircleTaskHeaderList.vue
@@ -113,6 +113,13 @@ | @@ -113,6 +113,13 @@ | ||
113 | :customRow="clickThenSelect" | 113 | :customRow="clickThenSelect" |
114 | @change="handleTableChange"> | 114 | @change="handleTableChange"> |
115 | 115 | ||
116 | + | ||
117 | + <span slot="status_dictText" slot-scope="status_dictText"> | ||
118 | + <a-tag :key="status_dictText" :color="getStatusColor(status_dictText)"> | ||
119 | + {{ status_dictText }} | ||
120 | + </a-tag> | ||
121 | + </span> | ||
122 | + | ||
116 | <span slot="zoneCode" slot-scope="zoneCode"> | 123 | <span slot="zoneCode" slot-scope="zoneCode"> |
117 | <a-tag :key="zoneCode" color=blue> | 124 | <a-tag :key="zoneCode" color=blue> |
118 | {{ solutionZoneCode(zoneCode) }} | 125 | {{ solutionZoneCode(zoneCode) }} |
@@ -240,6 +247,7 @@ export default { | @@ -240,6 +247,7 @@ export default { | ||
240 | title: '任务状态', | 247 | title: '任务状态', |
241 | align: "center", | 248 | align: "center", |
242 | dataIndex: 'status_dictText', | 249 | dataIndex: 'status_dictText', |
250 | + scopedSlots: {customRender: 'status_dictText'} | ||
243 | }, | 251 | }, |
244 | { | 252 | { |
245 | title: '异常信息', | 253 | title: '异常信息', |
@@ -314,6 +322,16 @@ export default { | @@ -314,6 +322,16 @@ export default { | ||
314 | } | 322 | } |
315 | }, | 323 | }, |
316 | methods: { | 324 | methods: { |
325 | + getStatusColor(status) { | ||
326 | + const colors = { | ||
327 | + '生成任务': 'green', | ||
328 | + '下发任务': 'blue', | ||
329 | + '到达拣选站台': 'orange', | ||
330 | + '任务完成': 'grey', | ||
331 | + default: 'default' | ||
332 | + }; | ||
333 | + return colors[status] || colors.default; | ||
334 | + }, | ||
317 | initDictConfig() { | 335 | initDictConfig() { |
318 | }, | 336 | }, |
319 | clickThenSelect(record) { | 337 | clickThenSelect(record) { |
ant-design-vue-jeecg/src/views/system/task/TransferTaskHeaderList.vue
@@ -113,6 +113,12 @@ | @@ -113,6 +113,12 @@ | ||
113 | :customRow="clickThenSelect" | 113 | :customRow="clickThenSelect" |
114 | @change="handleTableChange"> | 114 | @change="handleTableChange"> |
115 | 115 | ||
116 | + <span slot="status_dictText" slot-scope="status_dictText"> | ||
117 | + <a-tag :key="status_dictText" :color="getStatusColor(status_dictText)"> | ||
118 | + {{ status_dictText }} | ||
119 | + </a-tag> | ||
120 | + </span> | ||
121 | + | ||
116 | <span slot="zoneCode" slot-scope="zoneCode"> | 122 | <span slot="zoneCode" slot-scope="zoneCode"> |
117 | <a-tag :key="zoneCode" color=blue> | 123 | <a-tag :key="zoneCode" color=blue> |
118 | {{ solutionZoneCode(zoneCode) }} | 124 | {{ solutionZoneCode(zoneCode) }} |
@@ -247,6 +253,7 @@ export default { | @@ -247,6 +253,7 @@ export default { | ||
247 | title: '任务状态', | 253 | title: '任务状态', |
248 | align: "center", | 254 | align: "center", |
249 | dataIndex: 'status_dictText', | 255 | dataIndex: 'status_dictText', |
256 | + scopedSlots: {customRender: 'status_dictText'} | ||
250 | }, | 257 | }, |
251 | { | 258 | { |
252 | title: '异常信息', | 259 | title: '异常信息', |
@@ -321,6 +328,16 @@ export default { | @@ -321,6 +328,16 @@ export default { | ||
321 | } | 328 | } |
322 | }, | 329 | }, |
323 | methods: { | 330 | methods: { |
331 | + getStatusColor(status) { | ||
332 | + const colors = { | ||
333 | + '生成任务': 'green', | ||
334 | + '下发任务': 'blue', | ||
335 | + '到达拣选站台': 'orange', | ||
336 | + '任务完成': 'grey', | ||
337 | + default: 'default' | ||
338 | + }; | ||
339 | + return colors[status] || colors.default; | ||
340 | + }, | ||
324 | initDictConfig() { | 341 | initDictConfig() { |
325 | }, | 342 | }, |
326 | clickThenSelect(record) { | 343 | clickThenSelect(record) { |