Browse Source

小程序样式优化

dev
liujiangyong 1 year ago
parent
commit
fc5cf604c4
  1. 50
      weapp/src/packages/patrol/index.jsx
  2. 41
      weapp/src/packages/patrol/index.scss

50
weapp/src/packages/patrol/index.jsx

@ -1444,12 +1444,14 @@ const Index = () => {
isSuperAdmin && (wait === 'wait' || kind === 'handle') && <View className='appoint'> isSuperAdmin && (wait === 'wait' || kind === 'handle') && <View className='appoint'>
{ {
handleState === '待处理' && <> handleState === '待处理' && <>
<RadioGroup onChange={(e) => { <View className='appoint-radio'>
setIsAppoint(e.detail.value === '指派' ? true : false) <RadioGroup onChange={(e) => {
}}> setIsAppoint(e.detail.value === '指派' ? true : false)
<Radio value='指派' checked={isAppoint} color='#0080EE' className='radio'>指派</Radio> }}>
<Radio value='不处理' checked={!isAppoint} color='#0080EE' className='radio' style={{ marginLeft: 10 }}>不处理</Radio> <Radio value='指派' checked={isAppoint} color='#0080EE'>指派</Radio>
</RadioGroup> <Radio value='不处理' checked={!isAppoint} color='#0080EE' style={{ marginLeft: 10 }}>不处理</Radio>
</RadioGroup>
</View>
{ {
isAppoint && <> isAppoint && <>
<View className='picker'> <View className='picker'>
@ -1463,13 +1465,15 @@ const Index = () => {
<Image src={arrowIcon} className='arrow' /> <Image src={arrowIcon} className='arrow' />
</Picker> </Picker>
</View> </View>
<Textarea <View className='handle-advice'>
placeholder='请输入处理意见' <Textarea
value={handleAdvice} placeholder='请输入处理意见'
onInput={e => setHandleAdvice(e.target.value)} value={handleAdvice}
disabled={isView && handleState !== '待处理'} onInput={e => setHandleAdvice(e.target.value)}
maxlength={1024} disabled={isView && handleState !== '待处理'}
/> maxlength={1024}
/>
</View>
</> </>
} }
</> </>
@ -1478,33 +1482,33 @@ const Index = () => {
} }
{ {
handleState !== '待处理' && <View style={{ backgroundColor: '#fff', padding: 10 }}> handleState !== '待处理' && <View >
{ {
isSuperAdmin && handleState === '不处理' && <Text> isSuperAdmin && handleState === '不处理' && <View className='general-cell'>
处理结果暂不进行处理 处理结果暂不进行处理
</Text> </View>
} }
{ {
(!isSuperAdmin || (isSuperAdmin && (handleState === '已指派' || handleState === '已处理'))) && <> (!isSuperAdmin || (isSuperAdmin && (handleState === '已指派' || handleState === '已处理'))) && <View className='general-cell' style={{ padding: '5px 10px' }}>
<View>处理意见</View> <View>处理意见</View>
<View>{handleAdvice}</View> <View>{handleAdvice}</View>
</> </View>
} }
{ {
(isSuperAdmin && (handleState === '已指派' || handleState === '已处理')) && <> (isSuperAdmin && (handleState === '已指派' || handleState === '已处理')) && <View className='general-cell' >
<View style={{ marginTop: 10 }}>责任人</View> <View>责任人</View>
<View> <View>
{appointUser !== null ? allDepUsers.find(d => d.depId === userList.find(u => u.id === appointUser)?.departmentId)?.depName : ''} {appointUser !== null ? allDepUsers.find(d => d.depId === userList.find(u => u.id === appointUser)?.departmentId)?.depName : ''}
- -
{appointUser !== null ? userList.find(u => u.id === appointUser)?.name : ''} {appointUser !== null ? userList.find(u => u.id === appointUser)?.name : ''}
</View> </View>
</> </View>
} }
</View> </View>
} }
{ {
((isSuperAdmin && handleState == '已处理') || !isSuperAdmin) && <> ((isSuperAdmin && handleState == '已处理') || !isSuperAdmin) && <View style={{ marginTop: 2 }}>
<View className='patrol-img'><Text style={{ color: 'red' }}>*</Text>处理内容</View> <View className='patrol-img'><Text style={{ color: 'red' }}>*</Text>处理内容</View>
<AtTextarea <AtTextarea
placeholder='请输入处理内容' placeholder='请输入处理内容'
@ -1532,7 +1536,7 @@ const Index = () => {
/> : '' /> : ''
} }
</View> </View>
</> </View>
} }
{handle != 'handle' && handleState != '已处理' ? <AtButton type='primary' className='sub-btn' onClick={handleOk}>提交</AtButton> : ''} {handle != 'handle' && handleState != '已处理' ? <AtButton type='primary' className='sub-btn' onClick={handleOk}>提交</AtButton> : ''}

41
weapp/src/packages/patrol/index.scss

@ -283,14 +283,28 @@ page {
} }
.appoint { .appoint {
margin-top: 10px; // margin-top: 10px;
padding: 10px 20px; // padding: 10px 20px;
background-color: #fff; // background-color: #fff;
.appoint-radio {
height: 96px;
background-color: #fff;
margin-top: 5px;
padding: 0 20px;
display: flex;
justify-content: start;
align-items: center;
}
.picker { .picker {
margin: 10px 0; height: 96px;
background-color: #fff;
margin-top: 5px;
padding: 0 20px;
display: flex; display: flex;
justify-content: flex-start; justify-content: space-between;
align-items: center;
.arrow { .arrow {
width: 24px; width: 24px;
@ -298,5 +312,22 @@ page {
margin: 0 10px; margin: 0 10px;
} }
} }
.handle-advice {
background-color: #fff;
margin-top: 5px;
padding: 10px 20px;
}
}
.general-cell {
min-height: 96px;
background-color: #fff;
margin-top: 5px;
padding: 0px 20px;
display: flex;
justify-content: start;
align-items: center;
flex-wrap: wrap;
} }
} }
Loading…
Cancel
Save