|
|
@ -21,9 +21,7 @@ const Information = (props) => { |
|
|
|
const [pictureUrl, setPictureUrl] = useState() |
|
|
|
const [companyID, setCompanyId] = useState('') |
|
|
|
const [select, setSelect] = useState([]) |
|
|
|
var QRCode = require('qrcode') |
|
|
|
|
|
|
|
|
|
|
|
// var QRCode = require('qrcode')
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
projectList(query) |
|
|
@ -40,25 +38,24 @@ const Information = (props) => { |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
const createQrCode = (name) => { |
|
|
|
let url = '' |
|
|
|
QRCode.toDataURL(name, { |
|
|
|
errorCorrectionLevel: 'low', |
|
|
|
type: 'image/png', |
|
|
|
quality: 0.3, |
|
|
|
margin: 2, |
|
|
|
maskPattern: 9, |
|
|
|
width: 400, |
|
|
|
color: { |
|
|
|
dark: "#000000ff", |
|
|
|
light: "#ffffffff" |
|
|
|
} |
|
|
|
}, function (err, v) { |
|
|
|
url = v |
|
|
|
}) |
|
|
|
return url |
|
|
|
} |
|
|
|
|
|
|
|
// const createQrCode = (name) => {
|
|
|
|
// let url = ''
|
|
|
|
// QRCode.toDataURL(name, {
|
|
|
|
// errorCorrectionLevel: 'low',
|
|
|
|
// type: 'image/png',
|
|
|
|
// quality: 0.3,
|
|
|
|
// margin: 2,
|
|
|
|
// maskPattern: 9,
|
|
|
|
// width: 400,
|
|
|
|
// color: {
|
|
|
|
// dark: "#000000ff",
|
|
|
|
// light: "#ffffffff"
|
|
|
|
// }
|
|
|
|
// }, function (err, v) {
|
|
|
|
// url = v
|
|
|
|
// })
|
|
|
|
// return url
|
|
|
|
// }
|
|
|
|
|
|
|
|
const columns = [ |
|
|
|
{ |
|
|
|