|
|
@ -9,7 +9,8 @@ function remarksModal (props) { |
|
|
|
visible, |
|
|
|
rowId, |
|
|
|
dispatch, |
|
|
|
actions |
|
|
|
actions, |
|
|
|
cameraRemarks |
|
|
|
} = props; |
|
|
|
const { equipmentWarehouse } = actions; |
|
|
|
const [ScrollList, setScrollList] = useState([{num:'01',value:''},{num:'02',value:''},{num:'03',value:''}]); //显示 |
|
|
@ -17,13 +18,19 @@ function remarksModal (props) { |
|
|
|
const [roll,setroll] = useState(false); |
|
|
|
const [showValueNum,setShowValueNum] = useState(0); |
|
|
|
const valueNum = useRef(0); |
|
|
|
|
|
|
|
// useEffect(() => { |
|
|
|
// setShowScrollList([ |
|
|
|
// '周杰伦7月6日出专辑,请大家多多捧场备注', |
|
|
|
// '111111111111111111111111111111111111111111111111111111' |
|
|
|
// ]) |
|
|
|
// }, []); |
|
|
|
//初始化 |
|
|
|
useEffect(() => { |
|
|
|
let myScrollList=ScrollList |
|
|
|
for (let index = 0; index < cameraRemarks.length; index++) { |
|
|
|
myScrollList[index].value=cameraRemarks[index].remark |
|
|
|
} |
|
|
|
setScrollList(myScrollList) |
|
|
|
let mycameraRemarks=[] |
|
|
|
for (let index = 0; index < cameraRemarks.length; index++) { |
|
|
|
mycameraRemarks.push(cameraRemarks[index].remark) |
|
|
|
} |
|
|
|
setShowScrollList(mycameraRemarks) |
|
|
|
}, []); |
|
|
|
|
|
|
|
function handleOk () { |
|
|
|
//点击弹框确定 右边按钮 |
|
|
@ -36,13 +43,11 @@ function remarksModal (props) { |
|
|
|
close(); |
|
|
|
}) |
|
|
|
} |
|
|
|
function handleAfterClose () { |
|
|
|
//在关闭之后 |
|
|
|
} |
|
|
|
function handleCancel () { |
|
|
|
close(); |
|
|
|
//点击弹框取消 左边按钮 |
|
|
|
} |
|
|
|
//修改 |
|
|
|
function onChange(value,num){ |
|
|
|
valueNum.current=0 |
|
|
|
let myScrollList=ScrollList |
|
|
@ -56,10 +61,12 @@ function remarksModal (props) { |
|
|
|
} |
|
|
|
setShowValueNum(valueNum.current); |
|
|
|
} |
|
|
|
//获取焦点 |
|
|
|
function onFocus(num){ |
|
|
|
setShowScrollList([ScrollList[num].value]) |
|
|
|
setroll(true) |
|
|
|
} |
|
|
|
//失去焦点 |
|
|
|
function onBlur(){ |
|
|
|
setShowScrollList([]) |
|
|
|
let myScrollList = [] |
|
|
@ -80,7 +87,6 @@ function remarksModal (props) { |
|
|
|
visible={visible} |
|
|
|
onOk={handleOk} |
|
|
|
width={763} |
|
|
|
afterClose={handleAfterClose} |
|
|
|
onCancel={handleCancel} |
|
|
|
> |
|
|
|
<div style={{margin:"2px 14px 18px 29px",display:'flex'}}> |
|
|
|