Browse Source

feat:工单接入实际数据

dev
zhaobing’ 1 year ago
parent
commit
9039606dda
  1. 88
      api/app/lib/controllers/project/group.js
  2. 2
      api/app/lib/middlewares/camunda-rest.js
  3. 70
      api/app/lib/models/form_data_table.js
  4. 8
      api/app/lib/routes/project/index.js
  5. 208
      api/app/lib/schedule/workOrder.js
  6. BIN
      script/3.2/schema/1.create_form_data_table.sql
  7. 32
      web/client/src/sections/projectGroup/actions/group.js
  8. 55
      web/client/src/sections/projectGroup/containers/bigscreen.jsx
  9. 2
      web/client/src/sections/workOrder/containers/aboutMe.jsx
  10. 2
      web/client/src/sections/workOrder/containers/initiated.jsx
  11. 3
      web/client/src/sections/workOrder/containers/preserve.jsx
  12. 2
      web/client/src/sections/workOrder/containers/receipt.jsx
  13. 2
      web/client/src/sections/workOrder/containers/stayDoWorkOrder.jsx
  14. 3
      web/client/src/utils/webapi.js

88
api/app/lib/controllers/project/group.js

@ -586,6 +586,90 @@ async function groupProject (ctx) {
} }
} }
async function getProjectWorkOrders(){
try{
// 计算一个月前的日期
const oneMonthAgo = moment().subtract(1, 'months').toDate()
const { models } = ctx.fs.dc
const {Op, fn, col} = ctx.fs.dc.ORM.sequelize
const { projectIds } = ctx.query
if(projectIds&&projectIds.length){
const projectIdsArr=projectIds.map(Number)
const res= await models.FormDataTable.findAll({
attributes: [
'projectId',
[fn('COUNT', col('id')), 'count'],
],
where: {
projectIds: {
[Op.in]: projectIdsArr,
},
startTime: {
[Op.gte]: oneMonthAgo,
},
},
group: ['projectId'],
order: [[fn('COUNT', col('id')), 'DESC']],
})
ctx.body=res
ctx.status=200
}else{
ctx.body='没有查询到数据'
ctx.status=204
}
}catch(error){
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
async function getWorkOrdersRepairRank(){
try{
const oneMonthAgo = moment().subtract(1, 'months').toDate()
const { models } = ctx.fs.dc
const {Op, fn, col} = ctx.fs.dc.ORM.sequelize
const { projectIds } = ctx.query
if(projectIds&&projectIds.length){
const res= await models.FormDataTable.findAll({
where: {
projectIds: {
[Op.in]: projectIdsArr,
},
startTime: {
[Op.gte]: oneMonthAgo,
}
},
order: [
[fn('TIMESTAMPDIFF', literal('SECOND'), col('endTime'), col('startTime')), 'DESC']
]
})
ctx.body=res
ctx.status=200
}else{
ctx.body='没有查询到信息'
ctx.status=204
}
}catch(error){
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.body = {
message: typeof error == 'string' ? error : undefined
}
}
}
module.exports = { module.exports = {
groupList, groupList,
groupDetail, groupDetail,
@ -594,5 +678,7 @@ module.exports = {
groupStatistic, groupStatistic,
groupStatisticOnline, groupStatisticOnline,
groupStatisticAlarm, groupStatisticAlarm,
groupProject groupProject,
getProjectWorkOrders,
getWorkOrdersRepairRank
}; };

2
api/app/lib/middlewares/camunda-rest.js

@ -10,7 +10,7 @@ function factory(app, router, opts) {
const password = ctx.fs.api.password ? ctx.fs.api.password : "fs-workflow"; const password = ctx.fs.api.password ? ctx.fs.api.password : "fs-workflow";
// console.log('[camunda-rest] ctx.fs.api:', JSON.stringify(ctx.fs.api)) // console.log('[camunda-rest] ctx.fs.api:', JSON.stringify(ctx.fs.api))
console.log('[camunda-rest] ctx.fs.api.camundaUserId:', ctx.fs.api.camundaUserId) // console.log('[camunda-rest] ctx.fs.api.camundaUserId:', ctx.fs.api.camundaUserId)
const req = { const req = {
get: (url, query) => { get: (url, query) => {
return request return request

70
api/app/lib/models/form_data_table.js

@ -0,0 +1,70 @@
/* eslint-disable*/
'use strict';
module.exports = dc => {
const DataTypes = dc.ORM;
const sequelize = dc.orm;
const FormDataTable = sequelize.define("formDataTable", {
id: {
type: DataTypes.INTEGER,
allowNull: false,
defaultValue: "nextval(\"formDataTable_id_seq\"::regclass)",
comment: "id",
primaryKey: true,
field: "id",
autoIncrement: false
},
projectId: {
type: DataTypes.INTEGER,
allowNull: true,
defaultValue: null,
comment: "项目id",
primaryKey: false,
field: "project_id",
autoIncrement: false
},
formname: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: "工单名称",
primaryKey: false,
field: "formname",
autoIncrement: false
},
startTime: {
type: DataTypes.DATE,
allowNull: true,
defaultValue: null,
comment: "开始时间",
primaryKey: false,
field: "start_time",
autoIncrement: false
},
endTime: {
type: DataTypes.DATE,
allowNull: true,
defaultValue: null,
comment: "结束时间",
primaryKey: false,
field: "end_time",
autoIncrement: false
},
state: {
type: DataTypes.STRING,
allowNull: true,
defaultValue: null,
comment: null,
primaryKey: false,
field: "state",
autoIncrement: false
}
}, {
tableName: "form_data_table",
comment: "",
indexes: []
});
dc.models.FormDataTable = FormDataTable;
return FormDataTable;
};

8
api/app/lib/routes/project/index.js

@ -54,4 +54,12 @@ module.exports = function (app, router, opts) {
app.fs.api.logAttr['GET/project/group/list'] = { content: '获取分组项目信息', visible: true }; app.fs.api.logAttr['GET/project/group/list'] = { content: '获取分组项目信息', visible: true };
router.get('/project/group/list', projectGroup.groupProject); router.get('/project/group/list', projectGroup.groupProject);
app.fs.api.logAttr['GET/project/workOrders'] = { content: '获取项目工单信息', visible: true };
router.get('/project/workOrders', projectGroup.getProjectWorkOrders);
app.fs.api.logAttr['GET/project/workOrders/repairRank'] = { content: '获取工单修复信息', visible: true };
router.get('project/workOrders/repairRank', projectGroup.getWorkOrdersRepairRank);
}; };

208
api/app/lib/schedule/workOrder.js

@ -1,116 +1,94 @@
// const schedule = require('node-schedule'); const schedule = require('node-schedule');
// const moment = require('moment') const moment = require('moment')
let isDev = false
// module.exports = function (app, opts) {
// const updateAttendance = app.fs.scheduleInit( module.exports = function (app, opts) {
// { const workOrder = app.fs.scheduleInit(
// interval: '34 21 4 * * *', {
// // interval: '34 */15 * * * *', interval: '0 * * * *',//一小时执行一次
// immediate: true, immediate: isDev,
// proRun: true, proRun: !isDev,
// }, },
// async()=>{ async()=>{
// try{ try{
// const startTime = moment() //前一次执行时间
// const { models } = app.fs.dc console.log('工单数据抽取开始')
// const { clickHouse } = app.fs let lastExecutionTime = null;
// const { database: camWorkflow } = clickHouse.camWorkflow.opts.config const { parseProcessData } = app.fs.utils
// //工单数据 const startTime = moment()
// let workOrderNeedData = { const { models } = app.fs.dc
// projectName: { const { clickHouse } = app.fs
// keyWord: ['项目名称'], const { database: camWorkflow } = clickHouse.camWorkflow.opts.config
// require: true, //新建表是否有数据
// }, const rescount=await models.FormDataTable.count()
// applyTime: { if (lastExecutionTime === null) {
// keyWord: ['申请时间'], lastExecutionTime = moment().subtract(1, 'hour');
// require: true, }
// }, const formRes = await clickHouse.pepEmis.query(
// completionTime: { `SELECT
// keyWord: ['处理完成时间'], story.id AS historyId,
// require: true, story.procinst_id as procinstId,
// }, story.apply_user AS pepUserId,
// state:{ story.form_data AS formData,
// keyWord:[''], story.submit_form_data AS submitFormData,
// require: true, story.create_at as createTime,
// }, fform.form_schema AS formSchema,
fprocess.name AS processName,
procin.state_ AS state,
procin.end_time_ as endTime,
fform.id AS formId,
fversion.id AS versionId,
fgroup.name AS groupName
FROM
workflow_process_history AS story
INNER JOIN workflow_process_version AS fversion
ON fversion.id = story.version_id
INNER JOIN workflow_process_form AS fform
ON fform.id = fversion.form_id
// } INNER JOIN workflow_process AS fprocess
// const attendanceRes = await clickHouse.pepEmis.query( ON fprocess.id = fform.process_id
// ` AND fprocess.name = '运维中台售后问题处理工单'
// SELECT INNER JOIN workflow_group AS fgroup
// story.id AS historyId, ON fgroup.id = fprocess.group_id
// story.apply_user AS pepUserId, INNER JOIN ${camWorkflow}.act_hi_procinst AS procin
// story.form_data AS formData, ON procin.id_ = story.procinst_id
// story.submit_form_data AS submitFormData, ${rescount ?` WHERE procin.end_time_ is not null
// fform.form_schema AS formSchema, AND procin.end_time_ > '${lastExecutionTime}'
// fprocess.name AS processName, AND procin.end_time_ <='${startTime}'`
// procin.state_ AS state, : ''}`
// fform.id AS formId, ).toPromise()
// fversion.id AS versionId, console.log('formRes1',formRes)
// fgroup.name AS groupName const procinstIds = [...new Set(formRes.map(e => e.procinstId))];
// FROM // 获取流程实例变量
// workflow_process_history AS story if(formRes && formRes.length > 0){
// INNER JOIN workflow_process_version AS fversion let procinstsVariables = await ctx.app.camunda.request.post(encodeURI(`/engine-rest/history/variable-instance`), {
// ON fversion.id = story.version_id processInstanceIdIn: procinstIds
// INNER JOIN workflow_process_form AS fform })
// ON fform.id = fversion.form_id for (let f of formRes) {
// INNER JOIN workflow_process AS fprocess if(f?.formData?.formData && f?.formData?.workflowProcessVersion?.workflowProcessForm?.formSchema) {
// ON fprocess.id = fform.process_id const parseData = parseProcessData({
// INNER JOIN workflow_group AS fgroup formSchema: JSON.parse(f.formSchema),
// ON fgroup.id = fprocess.group_id formData: JSON.parse(f.formData)
// AND fgroup.name = '' })
// INNER JOIN ${camWorkflow}.act_hi_procinst AS procin await models.Workorder.create({
// ON procin.id_ = story.procinst_id` projectId:parseData.pomsProjectId.value || null,
// +` ${existOvertimeCount || existVacateCount ?`WHERE story.create_at > '2023-03-16 00:00:00'`: ''}` formname:procinstsVariables.find(item=>item.id===f.procinstId).name||null,
// ).toPromise() state: f.state||null,
endTime:f.endTime||null,
startTime:f.createTime||null
})
console.log('工单数据抽取结束')
}
}
}
}catch(error){
console.error(error)
}
}
);
return {
workOrder,
}
}
// }catch(error){
// }
// }
// );
// return {
// updateAttendance,
// }
// }

BIN
script/3.2/schema/1.create_form_data_table.sql

Binary file not shown.

32
web/client/src/sections/projectGroup/actions/group.js

@ -103,3 +103,35 @@ export function groupProject (query = {}) {
}); });
} }
export function getProjectWorkOrders (query) {
return (dispatch) => basicAction({
type: "get",
dispatch: dispatch,
query,
actionType: "GET_PROJECT_WORK_ORDERS",
url: `${ApiTable.projectWordOrders}`,
msg: { error: "获取项目工单信息失败" },
reducer: {
name: "projectWorkOrders",
params: { noClear: true }
},
});
}
export function getWorkOrdersRepairRank (query) {
return (dispatch) => basicAction({
type: "get",
dispatch: dispatch,
query,
actionType: "GET_WORK_ORDERS_REPAIR_RANK",
url: `${ApiTable.wordOrdersRepairRank}`,
msg: { error: "获取工单修复排名信息失败" },
reducer: {
name: "projectWorkOrders",
params: { noClear: true }
},
});
}

55
web/client/src/sections/projectGroup/containers/bigscreen.jsx

@ -15,7 +15,7 @@ let interrupt
let repair let repair
let overviewScrollbar; let overviewScrollbar;
const Bigscreen = (props) => { const Bigscreen = (props) => {
const { dispatch, actions, user, match, history, clientHeight, groupStatisticOnline, ...restProps } = props const { dispatch, actions, user, match, history, clientHeight, groupStatisticOnline, pomsProjectBasicAll,...restProps } = props
const [InterruptRank, setInterruptRank] = useState([]) const [InterruptRank, setInterruptRank] = useState([])
const [online, setOnline] = useState([]) const [online, setOnline] = useState([])
@ -56,19 +56,22 @@ const Bigscreen = (props) => {
} }
}) })
dispatch(actions.projectGroup.groupProject({ groupId: groupId_ })).then(res => { // dispatch(actions.projectGroup.groupProject({ groupId: groupId_ })).then(res => {
if (res.success) { // if (res.success) {
setGroupProject(res.payload.data?.map(v => ({ ...v, value: (Math.random() * 20).toFixed(0) })) || []) // // setProportion([...res.payload.data?.slice(0, 3)?.map(v => ({ name: v.name || v.pepProjectName, value: (Math.random() * 20).toFixed(0) })), { value: 20, name: '' }])
setProportion([...res.payload.data?.slice(0, 3)?.map(v => ({ name: v.name || v.pepProjectName, value: (Math.random() * 20).toFixed(0) })), { value: 20, name: '其它' }]) // }
} // })
})
dispatch(actions.projectGroup.getProjectGroupDetail(groupId_)).then(res => { dispatch(actions.projectGroup.getProjectGroupDetail(groupId_)).then(res => {
if (res.success) { if (res.success) {
setGroupDetail(res.payload.data) setGroupDetail(res.payload.data)
} }
}) })
const interruptDom = document.getElementById("interrupt"); const interruptDom = document.getElementById("interrupt");
if (interruptDom) { if (interruptDom) {
interrupt = new PerfectScrollbar("#interrupt", { interrupt = new PerfectScrollbar("#interrupt", {
@ -132,6 +135,28 @@ const Bigscreen = (props) => {
} }
}, [mockData]) }, [mockData])
useEffect(() => {
if(groupDetail?.pomsProjectIds&&groupDetail?.pomsProjectIds.length){
const query=res.payload.data.pomsProjectIds.split(',')
dispatch(actions.projectGroup.getProjectWorkOrders({projectIds:query}).then(res=>{
if(res.success){
setProportion([...res.payload.data?.slice(0, 3)?.map(v => ({ name: pomsProjectBasicAll.find(item=>item.valiue===v.projectId)?.label, value: v.count })),
{ value: res.payload.data&&res.payload.data.length>3?res.payload.data?.slice(3)?.reduce((p,c)=>{
return p+c
},0):0, name: '其它' }])
}
}))
dispatch(actions.projectGroup.getProjectWorkOrders({projectIds:query}).then(res=>{
if(res.success){
setGroupProject(res.payload.data?.slice(0, 10).map(v => ({name:v.formname,duration:v?.endTime.diff(v?.startTime,'hours') })) || [])
}
}))
}
},[groupDetail])
let statisticOnline = (groupId) => { let statisticOnline = (groupId) => {
dispatch(actions.projectGroup.groupStatisticOnline({ groupId })).then(res => { dispatch(actions.projectGroup.groupStatisticOnline({ groupId })).then(res => {
if (res.success) { if (res.success) {
@ -292,16 +317,18 @@ const Bigscreen = (props) => {
<div style={{ textAlign: 'center', width: '25%' }}>修复时长</div> <div style={{ textAlign: 'center', width: '25%' }}>修复时长</div>
</div> </div>
<div id="repair" style={{ position: 'relative', height: clientHeight * 0.55 - 220 }}> <div id="repair" style={{ position: 'relative', height: clientHeight * 0.55 - 220 }}>
{groupProject?.map((c, index) => { <AutoRollComponent content={<> {groupProject?.map((c, index) => {
return index < 10 ? <div style={{ display: "flex", background: index % 2 == 1 ? "#F6F9FF" : '', padding: 6, height: 50, alignItems: 'center' }}> return index < 10 ? <div style={{ display: "flex", background: index % 2 == 1 ? "#F6F9FF" : '', padding: 6, height: 50, alignItems: 'center' }}>
<div style={{ textAlign: 'center', width: '25%', fontFamily: 'SourceHanSansCN-Regular', color: '#2C66F3', fontWeight: 400 }}> <div style={{ textAlign: 'center', width: '25%', fontFamily: 'SourceHanSansCN-Regular', color: '#2C66F3', fontWeight: 400 }}>
NO.{index + 1}</div> NO.{index + 1}</div>
<div title={c.name || c.pepProjectName + "(售后工单)"} style={{ textAlign: 'center', padding: '0 6px', width: '49%', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}> <div title={c.fromname} style={{ textAlign: 'center', padding: '0 6px', width: '49%', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>
{c.name || c.pepProjectName}售后工单</div> {c.fromname}</div>
<div style={{ textAlign: 'center', width: '25%', fontFamily: 'SourceHanSansCN-Regular', fontWeight: 400 }}> <div style={{ textAlign: 'center', width: '25%', fontFamily: 'SourceHanSansCN-Regular', fontWeight: 400 }}>
{c.value}h</div> {c.duration}h</div>
</div> : <></> </div> : <></>
})} })}</>} containerStyle={{ position: "relative", height: "95%", }}
divHeight={"100%"} divId={"rank"} />
</div> </div>
</div> </div>
</Card> </Card>
@ -458,7 +485,7 @@ const Bigscreen = (props) => {
return <div style={{ display: "flex", background: index % 2 == 1 ? "#F6F9FF" : '', height: 40, alignItems: 'center' }}> return <div style={{ display: "flex", background: index % 2 == 1 ? "#F6F9FF" : '', height: 40, alignItems: 'center' }}>
<div style={{ textAlign: 'center', width: '33%', fontFamily: 'SourceHanSansCN-Regular', color: '#2C66F3', fontWeight: 400 }}>{c.name}</div> <div style={{ textAlign: 'center', width: '33%', fontFamily: 'SourceHanSansCN-Regular', color: '#2C66F3', fontWeight: 400 }}>{c.name}</div>
<div style={{ textAlign: 'center', width: '33%' }}>{title}</div> <div style={{ textAlign: 'center', width: '33%' }}>{title}</div>
<div style={{ textAlign: 'center', width: '33%', fontFamily: 'SourceHanSansCN-Regular', color: '#F33B3B', fontWeight: 400 }}>{c.offnum + '/' + c.totnum}</div> <div style={{ textAlign: 'center', width: '33%', fontFamily: 'SourceHanSansCN-Regular', color: '#F33B3B', fontWeight: 400 }}>{c.offnum + '/' + c.totnum`(${(c.offnum/c.totnum).toFixed(4)*100}%)`}</div>
</div> </div>
})}</> } containerStyle={{ position: "relative", height: "85%", }} })}</> } containerStyle={{ position: "relative", height: "85%", }}
divHeight={"100%"} divId={"interruptchart"}/> divHeight={"100%"} divId={"interruptchart"}/>

2
web/client/src/sections/workOrder/containers/aboutMe.jsx

@ -91,7 +91,7 @@ const Rest = (props) => {
title: '申请内容描述', title: '申请内容描述',
dataIndex: 'applyContent', dataIndex: 'applyContent',
render: (text, record, index) => { render: (text, record, index) => {
return record.name === '运维中台售后问题处理工单' ? record?.pomsNeedData?.detail?.value.length > 5 ? return record.name === '运维中台售后问题处理工单' ? record?.pomsNeedData?.detail?.value&&record?.pomsNeedData?.detail?.value.length > 5 ?
<Tooltip content={record?.pomsNeedData?.detail?.value}>{record?.pomsNeedData?.detail?.value.substring(0, 5) + '...'}</Tooltip> : record?.pomsNeedData?.detail?.value || '' : record?.pomsNeedData?.applyContent?.value || '' <Tooltip content={record?.pomsNeedData?.detail?.value}>{record?.pomsNeedData?.detail?.value.substring(0, 5) + '...'}</Tooltip> : record?.pomsNeedData?.detail?.value || '' : record?.pomsNeedData?.applyContent?.value || ''
} }
}, },

2
web/client/src/sections/workOrder/containers/initiated.jsx

@ -82,7 +82,7 @@ const Rest = (props) => {
title: '申请内容描述', title: '申请内容描述',
dataIndex: 'applyContent', dataIndex: 'applyContent',
render: (text, record, index) => { render: (text, record, index) => {
return record.name==='运维中台售后问题处理工单'?record?.pomsNeedData?.detail?.value.length>5? return record.name==='运维中台售后问题处理工单'?record?.pomsNeedData?.detail?.value&&record?.pomsNeedData?.detail?.value.length>5?
<Tooltip content={record?.pomsNeedData?.detail?.value}>{record?.pomsNeedData?.detail?.value.substring(0, 5) + '...'}</Tooltip>:record?.pomsNeedData?.detail?.value || '':record?.pomsNeedData?.applyContent?.value || '' <Tooltip content={record?.pomsNeedData?.detail?.value}>{record?.pomsNeedData?.detail?.value.substring(0, 5) + '...'}</Tooltip>:record?.pomsNeedData?.detail?.value || '':record?.pomsNeedData?.applyContent?.value || ''
} }
}, },

3
web/client/src/sections/workOrder/containers/preserve.jsx

@ -73,6 +73,7 @@ const Rest = (props) => {
title: '项目名称', title: '项目名称',
dataIndex: 'pomsProject', dataIndex: 'pomsProject',
render: (text, record, index) => { render: (text, record, index) => {
console.log('pomsProjectBasicAll',pomsProjectBasicAll)
return record.name === '运维中台售后问题处理工单' ? return record.name === '运维中台售后问题处理工单' ?
pomsProjectBasicAll?.find(item => item.value == record?.pomsNeedData?.pomsProjectId?.value)?.label || '' : record?.pomsNeedData?.projectName?.value || '' pomsProjectBasicAll?.find(item => item.value == record?.pomsNeedData?.pomsProjectId?.value)?.label || '' : record?.pomsNeedData?.projectName?.value || ''
@ -81,7 +82,7 @@ const Rest = (props) => {
title: '申请内容描述', title: '申请内容描述',
dataIndex: 'applyContent', dataIndex: 'applyContent',
render: (text, record, index) => { render: (text, record, index) => {
return record.name === '运维中台售后问题处理工单' ? record?.pomsNeedData?.detail?.value.length > 5 ? return record.name === '运维中台售后问题处理工单' ? record?.pomsNeedData?.detail?.value&&record?.pomsNeedData?.detail?.value.length > 5 ?
<Tooltip content={record?.pomsNeedData?.detail?.value}>{record?.pomsNeedData?.detail?.value.substring(0, 5) + '...'}</Tooltip> : record?.pomsNeedData?.detail?.value || '' : record?.pomsNeedData?.applyContent?.value || '' <Tooltip content={record?.pomsNeedData?.detail?.value}>{record?.pomsNeedData?.detail?.value.substring(0, 5) + '...'}</Tooltip> : record?.pomsNeedData?.detail?.value || '' : record?.pomsNeedData?.applyContent?.value || ''
} }
}, },

2
web/client/src/sections/workOrder/containers/receipt.jsx

@ -93,7 +93,7 @@ const Rest = (props) => {
title: '申请内容描述', title: '申请内容描述',
dataIndex: 'applyContent', dataIndex: 'applyContent',
render: (text, record, index) => { render: (text, record, index) => {
return record.name === '运维中台售后问题处理工单' ? record?.pomsNeedData?.detail?.value.length > 5 ? return record.name === '运维中台售后问题处理工单' ? record?.pomsNeedData?.detail?.value&&record?.pomsNeedData?.detail?.value.length > 5 ?
<Tooltip content={record?.pomsNeedData?.detail?.value}>{record?.pomsNeedData?.detail?.value.substring(0, 5) + '...'}</Tooltip> : record?.pomsNeedData?.detail?.value || '' : record?.pomsNeedData?.applyContent?.value || '' <Tooltip content={record?.pomsNeedData?.detail?.value}>{record?.pomsNeedData?.detail?.value.substring(0, 5) + '...'}</Tooltip> : record?.pomsNeedData?.detail?.value || '' : record?.pomsNeedData?.applyContent?.value || ''
} }
}, },

2
web/client/src/sections/workOrder/containers/stayDoWorkOrder.jsx

@ -80,7 +80,7 @@ const Rest = (props) => {
title: '申请内容描述', title: '申请内容描述',
dataIndex: 'applyContent', dataIndex: 'applyContent',
render: (text, record, index) => { render: (text, record, index) => {
return record.fsFormItemName === '运维中台售后问题处理工单' ? record?.pomsNeedData?.detail?.value.length > 5 ? return record.fsFormItemName === '运维中台售后问题处理工单' ? record?.pomsNeedData?.detail?.value&&record?.pomsNeedData?.detail?.value.length > 5 ?
<Tooltip content={record?.pomsNeedData?.detail?.value}>{record?.pomsNeedData?.detail?.value.substring(0, 5) + '...'}</Tooltip> : record?.pomsNeedData?.detail?.value || '' : record?.pomsNeedData?.applyContent?.value || '' <Tooltip content={record?.pomsNeedData?.detail?.value}>{record?.pomsNeedData?.detail?.value.substring(0, 5) + '...'}</Tooltip> : record?.pomsNeedData?.detail?.value || '' : record?.pomsNeedData?.applyContent?.value || ''
} }
}, },

3
web/client/src/utils/webapi.js

@ -43,6 +43,9 @@ export const ApiTable = {
groupStatisticAlarm: 'project/group/statistic/alarm', groupStatisticAlarm: 'project/group/statistic/alarm',
groupProject: "project/group/list", groupProject: "project/group/list",
groupProjectDetail: "project/group/:groupId/detail", groupProjectDetail: "project/group/:groupId/detail",
projectWordOrders:'project/workOrders',
wordOrdersRepairRank:'project/workOrders/repairRank',
//告警 //告警
getProjectPoms: 'project/poms', //获取已绑定项目 getProjectPoms: 'project/poms', //获取已绑定项目

Loading…
Cancel
Save