Browse Source

小程序样式优化

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

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

@ -1444,12 +1444,14 @@ const Index = () => {
isSuperAdmin && (wait === 'wait' || kind === 'handle') && <View className='appoint'>
{
handleState === '待处理' && <>
<View className='appoint-radio'>
<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>
<Radio value='不处理' checked={!isAppoint} color='#0080EE' style={{ marginLeft: 10 }}>不处理</Radio>
</RadioGroup>
</View>
{
isAppoint && <>
<View className='picker'>
@ -1463,6 +1465,7 @@ const Index = () => {
<Image src={arrowIcon} className='arrow' />
</Picker>
</View>
<View className='handle-advice'>
<Textarea
placeholder='请输入处理意见'
value={handleAdvice}
@ -1470,6 +1473,7 @@ const Index = () => {
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>{handleAdvice}</View>
</>
</View>
}
{
(isSuperAdmin && (handleState === '已指派' || handleState === '已处理')) && <>
<View style={{ marginTop: 10 }}>责任人</View>
(isSuperAdmin && (handleState === '已指派' || handleState === '已处理')) && <View className='general-cell' >
<View>责任人</View>
<View>
{appointUser !== null ? allDepUsers.find(d => d.depId === userList.find(u => u.id === appointUser)?.departmentId)?.depName : ''}
-
{appointUser !== null ? userList.find(u => u.id === appointUser)?.name : ''}
</View>
</>
</View>
}
</View>
}
{
((isSuperAdmin && handleState == '已处理') || !isSuperAdmin) && <>
((isSuperAdmin && handleState == '已处理') || !isSuperAdmin) && <View style={{ marginTop: 2 }}>
<View className='patrol-img'><Text style={{ color: 'red' }}>*</Text>处理内容</View>
<AtTextarea
placeholder='请输入处理内容'
@ -1532,7 +1536,7 @@ const Index = () => {
/> : ''
}
</View>
</>
</View>
}
{handle != 'handle' && handleState != '已处理' ? <AtButton type='primary' className='sub-btn' onClick={handleOk}>提交</AtButton> : ''}

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

@ -283,14 +283,28 @@ page {
}
.appoint {
margin-top: 10px;
padding: 10px 20px;
// margin-top: 10px;
// padding: 10px 20px;
// 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 {
margin: 10px 0;
height: 96px;
background-color: #fff;
margin-top: 5px;
padding: 0 20px;
display: flex;
justify-content: flex-start;
justify-content: space-between;
align-items: center;
.arrow {
width: 24px;
@ -298,5 +312,22 @@ page {
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