feat(ai): 添加产品问答任务列表状态显示功能
- 新增 questionJobStateFormat 模板用于格式化任务状态显示
- 实现进行中、已完成、未启动三种状态的条件渲染
- 在任务列表表格中新增状态列并应用模板
- 状态列宽度设置为最小140像素居中对齐
| | |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <script type="text/html" id="questionJobStateFormat"> |
| | | {{# if(d.state == 1) { }} |
| | | <span>进行中</span> |
| | | {{# }else if(d.state == 2) { }} |
| | | <span>已完成</span> |
| | | {{# }else if(d.state == 0) { }} |
| | | <span>未启动</span> |
| | | {{# } else { }} |
| | | <span>-</span> |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <style> |
| | | .layui-form-onswitch { |
| | | background-color: #5FB878 !important; |
| | |
| | | {field: 'questionCnt', title: '生成总数', minWidth: 100,align:'center'}, |
| | | {field: 'questionDoneCnt', title: '已完成', minWidth: 100,align:'center'}, |
| | | {templet:"#difficultyFormat", title: '难度', minWidth: 140,align:'center'}, |
| | | {templet:"#questionJobStateFormat", title: '状态', minWidth: 140,align:'center'}, |
| | | {field: 'companyId', title: '公司编码', minWidth: 150,align:'center'}, |
| | | ]] |
| | | }); |