| | |
| | | m_numToInfo.insert("12","IsEnabled_pipe"); |
| | | m_numToInfo.insert("13","IsEnabled_network"); |
| | | m_numToInfo.insert("14","Baseboard_Serialnumber"); |
| | | changeUIstate(); |
| | | } |
| | | |
| | | QString MainWindow::toUpperAndLower(QString src) |
| | |
| | | QDateTime licensedate = QDateTime::currentDateTime(); |
| | | QDateTime newlicensedate = licensedate.addMonths(time); |
| | | QString licensedatestr = newlicensedate.toString("yyyy-MM-dd hh:mm:ss"); |
| | | licensekey_Obj[m_numToInfo.key("LicensedDuration_start")] = licensedate.toString("yyyy-MM-dd hh:mm:ss"); |
| | | licensekey_Obj[m_numToInfo.key("LicensedDuration_end")] = licensedatestr; |
| | | workingjsondoc.setObject(licensekey_Obj); |
| | | //数据压缩,去空格换行等多余无用信息 |
| | |
| | | QString Baseboard_Uuid = jsonObj[m_numToInfo.key("Baseboard_Uuid")].toString(); |
| | | QString src = QApplication::applicationDirPath(); |
| | | QDir dir(src); |
| | | QString file_name("activeList.xlsx"); |
| | | QString file_name(QStringLiteral("安全评价软件授权人数统计表.xlsx")); |
| | | QString filepath=dir.path()+"/"+file_name; |
| | | if(!dir.exists(file_name)){ |
| | | Document xlsx; |
| | |
| | | { |
| | | giveLicense(12); |
| | | } |
| | | |
| | | void MainWindow::on_pushButton_viewUsers_clicked() |
| | | { |
| | | QString excelPath = QApplication::applicationDirPath(); |
| | | QString widgetTitle = QStringLiteral("打开文件"); |
| | | QString filename = QFileDialog::getOpenFileName(nullptr,(widgetTitle),excelPath,tr("excel(*.xlsx)")); |
| | | if(filename=="") |
| | | { |
| | | return; |
| | | } |
| | | } |