diff --git a/api/app/lib/controllers/maintenancePlan/index.js b/api/app/lib/controllers/maintenancePlan/index.js index e08a9ce..f0117b1 100644 --- a/api/app/lib/controllers/maintenancePlan/index.js +++ b/api/app/lib/controllers/maintenancePlan/index.js @@ -3,10 +3,10 @@ //维护计划 async function getMaintenancePlan(ctx) { + const query = ctx.query try { const { models } = ctx.fs.dc const { clickHouse } = ctx.app.fs - const query = ctx.query //console.log('11121', query) let resCount = await models.MaintenancePlan.count({ where: { type: query.type } @@ -27,10 +27,10 @@ async function getMaintenancePlan(ctx) { const arrayUserId = [] res.rows.forEach((item) => { item.maintenancePlanExecuteUsers.forEach((item1) => { arrayUserId.push(item1.pepUserId) }) }) const arrayUserIdCopy = [...new Set(arrayUserId)] - const whereOption = '(' + arrayUserIdCopy.toString() + ')' + //(${ [...pepProjectIds].join(',') }, -1) const userRes = await clickHouse.pepEmis.query(` SELECT * FROM user - WHERE id in ${whereOption} + WHERE id IN (${[...arrayUserIdCopy].join(',')},-1) `).toPromise() //console.log('userRes', userRes) //console.log('res.rows', res.rows) diff --git a/web/client/src/sections/service/components/recordModal.jsx b/web/client/src/sections/service/components/recordModal.jsx index 6ebeabb..1adde9c 100644 --- a/web/client/src/sections/service/components/recordModal.jsx +++ b/web/client/src/sections/service/components/recordModal.jsx @@ -56,7 +56,7 @@ const okHandler=()=>{ >
{return item.account}),'type':recordRow?.type,'record':recordRow?.record}} + 'endTime':recordRow?.solvingTime,'settler':recordRow?.maintenanceRecordExecuteUsers.map((item)=>{return item.name}),'type':recordRow?.type,'record':recordRow?.record}} getFormApi={formApi => FormApi.current = formApi} labelPosition='left' labelAlign='right'> diff --git a/web/client/src/sections/service/containers/serviceRecord.jsx b/web/client/src/sections/service/containers/serviceRecord.jsx index 254170e..9799921 100644 --- a/web/client/src/sections/service/containers/serviceRecord.jsx +++ b/web/client/src/sections/service/containers/serviceRecord.jsx @@ -114,6 +114,7 @@ const Server = (props) => { title: '解决者', //width:20, render:(record)=>{ + // console.log('ressss',record) return {record?.maintenanceRecordExecuteUsers.map((item)=>{ return item.name @@ -132,10 +133,11 @@ const Server = (props) => { }, ]; const onChangeDate=(e)=> { + console.log('zzzz',e[0],e[1]) setMode('') setDateValue(e) - setStime(moment(dateValue[0]).format('YYYY-MM-DD HH:mm:ss')) - setEtime(moment(dateValue[1]).format('YYYY-MM-DD HH:mm:ss')) + setStime(moment(e[0]).format('YYYY-MM-DD HH:mm:ss')) + setEtime(moment(e[1]).format('YYYY-MM-DD HH:mm:ss')) const query={ sTime, eTime } @@ -178,7 +180,7 @@ const addHandler=()=>{ 全年 onChangeDate(e)} + onChange={e => onChangeDate(e) } density="compact" style={{ width: 260 }} value={dateValue} @@ -195,7 +197,7 @@ const addHandler=()=>{
产生时间 - {//console.log('1',e[0],e[1]) + { setStartTime((e[0])+'');setEndTime(e[1]+'') }} onClear={()=>{setStartTime(null);setEndTime(null);setCalculability('')}} />