U 产品中心不可用产品加颜色标示 另加一列显示可用状态 0235单独做产品详情页面
| | |
| | | " |
| | | type="vertical" |
| | | ></a-divider> |
| | | <a href="javascript:;" @click="toDetails08_09(record)" |
| | | <a |
| | | href="javascript:;" |
| | | @click="toDetails_type(record, '0809')" |
| | | >详情</a |
| | | > |
| | | </template> |
| | | <template v-if="/^0235/.test(record.subCode)"> |
| | | <a-divider |
| | | v-if=" |
| | | record.softwares && |
| | | record.softwares.length && |
| | | canDownloadSoftware |
| | | " |
| | | type="vertical" |
| | | ></a-divider> |
| | | <a |
| | | href="javascript:;" |
| | | @click="toDetails_type(record, '0235')" |
| | | >详情</a |
| | | > |
| | | </template> |
| | |
| | | query: { parentCode, customCode: "", parentModel, parentName }, |
| | | }); |
| | | }, |
| | | toDetails08_09(record) { |
| | | toDetails_type(record, type) { |
| | | const { |
| | | subCode: parentCode, |
| | | subModel: parentModel, |
| | |
| | | let { code, data } = res.data; |
| | | if (code && data) { |
| | | this.$router.push({ |
| | | path: "/resource/product-details-0809", |
| | | path: "/resource/product-details-" + type, |
| | | query: { parentCode, customCode: "", parentModel, parentName }, |
| | | }); |
| | | // console.log(data); |
| | |
| | | <template slot="enabled" slot-scope="{ record }"> |
| | | {{ record.enabled == -1 ? "是" : "否" }} |
| | | </template> |
| | | <template slot="enabled1" slot-scope="{ record }"> |
| | | {{ record.enabled == 1 ? "可用" : "不可用" }} |
| | | </template> |
| | | <template slot="isNormal" slot-scope="{ record }"> |
| | | {{ record.customCode == "" ? "是" : "否" }} |
| | | </template> |
| | |
| | | width: 100, |
| | | scopedSlots: { customRender: "enabled" }, |
| | | }, |
| | | { |
| | | title: "是否可用", |
| | | dataIndex: "enabled1", |
| | | dataType: "boolean", |
| | | align: "center", |
| | | searchAble: false, |
| | | width: 100, |
| | | scopedSlots: { customRender: "enabled1" }, |
| | | }, |
| | | // { |
| | | // title: "创建时间", |
| | | // dataIndex: "createTime", |
| | |
| | | let classList = []; |
| | | if (record.enabled == -1) { |
| | | classList.push("locked"); |
| | | } |
| | | if (record.enabled == 0) { |
| | | classList.push("unable"); |
| | | } |
| | | return classList; |
| | | }, |
| | |
| | | /deep/.locked.locked.locked:hover > td { |
| | | background: #fcd583; |
| | | } |
| | | /deep/.unable > td { |
| | | background: #f0637b; |
| | | } |
| | | /deep/.unable.unable.unable.ant-table-row-hover > td, |
| | | /deep/.unable.unable.unable:hover > td { |
| | | background: #ff869a; |
| | | } |
| | | </style> |
| | | |
| | | <style lang="less"> |
| | |
| | | }, |
| | | component: () => import('@/pages/resourceManage/product/details'), |
| | | }, |
| | | // 电源模块详情 |
| | | { |
| | | path: 'product-details-0235', |
| | | name: '电源模块详情', |
| | | meta: { |
| | | invisible: true, |
| | | highlight: '/resource/product' |
| | | }, |
| | | component: () => import('@/pages/resourceManage/product/details'), |
| | | }, |
| | | { |
| | | path: 'software', |
| | | name: '软件中心', |