|
@@ -1,12 +1,14 @@
|
|
|
-
|
|
|
-import ywgdjs from "@/assets/ywgdjs.png"
|
|
|
-import yjs from "@/assets/yjs.png"
|
|
|
-
|
|
|
+import v4 from '@/assets/order/4.0@2x.png'
|
|
|
+import gc from '@/assets/order/工程@2x.png'
|
|
|
+import jj from '@/assets/order/加急@2x.png'
|
|
|
+import ls from '@/assets/order/零售@2x.png'
|
|
|
+import yjs from '@/assets/order/已结算@2x.png'
|
|
|
+import ywg from '@/assets/order/已完工待结算@2x@2x.png'
|
|
|
+import yc from '@/assets/order/异常@2x.png'
|
|
|
+import zj from '@/assets/order/自建@2x.png'
|
|
|
export default {
|
|
|
data() {
|
|
|
- return {
|
|
|
-
|
|
|
- }
|
|
|
+ return {}
|
|
|
},
|
|
|
methods: {
|
|
|
// 表格列解析渲染数据更改
|
|
@@ -16,14 +18,22 @@ export default {
|
|
|
return (
|
|
|
<div style="padding:0 6px;display:flex;align-items:center;">
|
|
|
{(row[column.columnAttributes.prop] || []).map(item => {
|
|
|
- if (item.tagName == "已完工") {
|
|
|
- return (
|
|
|
- <img src={ywgdjs} style="width:16px;height:16px;margin:0 3px;" />
|
|
|
- )
|
|
|
- } else if (item.tagName == "已结算") {
|
|
|
- return (
|
|
|
- <img src={yjs} style="width:16px;height:16px;margin:0 3px;" />
|
|
|
- )
|
|
|
+ if (item.tagName == '4.0工单') {
|
|
|
+ return <img src={v4} style="width:20px;height:20px;margin:0 3px;" />
|
|
|
+ } else if (item.tagName == '工程') {
|
|
|
+ return <img src={gc} style="width:20px;height:20px;margin:0 3px;" />
|
|
|
+ } else if (item.tagName == '加急') {
|
|
|
+ return <img src={jj} style="width:20px;height:20px;margin:0 3px;" />
|
|
|
+ } else if (item.tagName == '零售') {
|
|
|
+ return <img src={ls} style="width:20px;height:20px;margin:0 3px;" />
|
|
|
+ } else if (item.tagName == '已结算') {
|
|
|
+ return <img src={yjs} style="width:20px;height:20px;margin:0 3px;" />
|
|
|
+ } else if (item.tagName == '已完工') {
|
|
|
+ return <img src={ywg} style="width:20px;height:20px;margin:0 3px;" />
|
|
|
+ } else if (item.tagName == '异常') {
|
|
|
+ return <img src={yc} style="width:20px;height:20px;margin:0 3px;" />
|
|
|
+ } else if (item.tagName == '自建工单') {
|
|
|
+ return <img src={zj} style="width:20px;height:20px;margin:0 3px;" />
|
|
|
} else {
|
|
|
return (
|
|
|
<div style="display: inline-block;border:1px solid #409EFF; color:#409EFF;padding:4px;border-radius: 4px;margin:2px 2px 0 0; font-size: 12px!important; line-height: 12px !important;">
|
|
@@ -40,33 +50,39 @@ export default {
|
|
|
defaultData.render = (h, { row, index, column }) => {
|
|
|
return (
|
|
|
<div style="padding:0 6px;cursor: pointer;">
|
|
|
- {row[column.columnAttributes.prop] ? row[column.columnAttributes.prop].split(" ")[0] : ""}
|
|
|
+ {row[column.columnAttributes.prop] ? row[column.columnAttributes.prop].split(' ')[0] : ''}
|
|
|
</div>
|
|
|
)
|
|
|
}
|
|
|
}
|
|
|
- if (item.jname === "orderStatus") {
|
|
|
+ if (item.jname === 'orderStatus') {
|
|
|
defaultData.render = (h, { row, index, column }) => {
|
|
|
var colors = {
|
|
|
- DJD: "#00acff",
|
|
|
- DSHPG: "#ff27bf",
|
|
|
- DWDPG: "#236cfe",
|
|
|
- DYY: "#0d07ff",
|
|
|
- FWZ: "#00ee5a",
|
|
|
- YCD: "#ff3030",
|
|
|
- YJS: "#02b100",
|
|
|
- YQX: "#ffbd2f",
|
|
|
- YWG: "#f77233",
|
|
|
- DQD:"#179f00",
|
|
|
+ DJD: '#00acff',
|
|
|
+ DSHPG: '#ff27bf',
|
|
|
+ DWDPG: '#236cfe',
|
|
|
+ DYY: '#0d07ff',
|
|
|
+ FWZ: '#00ee5a',
|
|
|
+ YCD: '#ff3030',
|
|
|
+ YJS: '#02b100',
|
|
|
+ YQX: '#ffbd2f',
|
|
|
+ YWG: '#f77233',
|
|
|
+ DQD: '#179f00'
|
|
|
}
|
|
|
return (
|
|
|
- <div style={`padding:0 6px;cursor: pointer;color:${colors[Object.entries(row.selectMapData.orderStatus).find(([key, val]) => val == row.orderStatus)?.[0] || '']};`}>
|
|
|
+ <div
|
|
|
+ style={`padding:0 6px;cursor: pointer;color:${
|
|
|
+ colors[
|
|
|
+ Object.entries(row.selectMapData.orderStatus).find(([key, val]) => val == row.orderStatus)?.[0] || ''
|
|
|
+ ]
|
|
|
+ };`}
|
|
|
+ >
|
|
|
{row[column.columnAttributes.prop]}
|
|
|
</div>
|
|
|
)
|
|
|
}
|
|
|
}
|
|
|
return defaultData
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
}
|