YaoH 3 veckor sedan
förälder
incheckning
18823bfc2a
5 ändrade filer med 19 tillägg och 17 borttagningar
  1. 1 1
      README.md
  2. 6 4
      blastProject/blastprojectpage.cpp
  3. 8 8
      blastProject/projectdialog.cpp
  4. 2 2
      blastProject/projectdialog.ui
  5. 2 2
      blastopepage.cpp

+ 1 - 1
README.md

@@ -34,7 +34,7 @@
 4. 有些请求为什么会失败?
    目前一些请求需要cookie, 所以需要从登录页面进入才可以。
 5. 如何添加用户?
-   访问后端APP。菜单: 基础信息 -> 人员管理。添加爆破员,操作员。
+   访问后端APP。菜单: 基础信息 -> 人员管理。添加井下爆破员,井上爆破员。
 
 6. 安全员控制逻辑。
    安全员汇报的地址可能包含多个爆破工程,但一个爆破工程不会上报多次地址。

+ 6 - 4
blastProject/blastprojectpage.cpp

@@ -50,8 +50,10 @@ void BlastProjectPage::loadDataFromSource(int currentPage, int pageSize) {
 
     // 定义表头信息
     QList<HeaderInfo> headers = {
-        {"工程名称", "name"},   {"操作员", "operatorName"},   {"爆破员", "blasterName"},   {"井下地址", "addressPath"},
-        {"雷管数量", "detSum"}, {"起爆器数量", "blastCount"}, {"起爆状态", "blastStatus"}, {"操作", ""},
+        {"工程名称", "name"},          {"井上爆破员", "operatorName"},
+        {"井下爆破员", "blasterName"}, {"井下地址", "addressPath"},
+        {"雷管数量", "detSum"},        {"起爆器数量", "blastCount"},
+        {"起爆状态", "blastStatus"},   {"操作", ""},
     };
 
     int headerCount = headers.size();
@@ -152,10 +154,10 @@ void BlastProjectPage::personOptionsByType(const QJsonArray &dataArray) {
             if (obj.contains("roleIds")) {
                 QJsonArray roleIdsArray = obj["roleIds"].toArray();
                 // Note: 一个用户可能存在多个角色
-                if (roleIdsArray.contains(BLATSTER_ROLE_ID)) {  // 爆破员
+                if (roleIdsArray.contains(BLATSTER_ROLE_ID)) {  // 井下爆破员
                     blasterDeployerArray.append(obj);
                 }
-                if (roleIdsArray.contains(OPERATOR_ROLE_ID)) {  // 操作
+                if (roleIdsArray.contains(OPERATOR_ROLE_ID)) {  // 井上爆破
                     operatorArray.append(obj);
                 }
             }

+ 8 - 8
blastProject/projectdialog.cpp

@@ -148,7 +148,7 @@ void ProjectDialog::clearFormData() {
                 }
             }
         }
-        ui->comboBoxBlast->setEditText("请选择爆破员");
+        ui->comboBoxBlast->setEditText("请选择井下爆破员");
     }
 
     if (ui->comboBoxOperator->model()) {
@@ -161,7 +161,7 @@ void ProjectDialog::clearFormData() {
                 }
             }
         }
-        ui->comboBoxOperator->setEditText("请选择操作员");
+        ui->comboBoxOperator->setEditText("请选择井上爆破员");
     }
 
     // 清除普通ComboBox
@@ -207,12 +207,12 @@ void ProjectDialog::validateAndSaveProject() {
     }
 
     if (selectedBlasters.isEmpty()) {
-        QMessageBox::warning(nullptr, "选择错误", "请至少选择一名爆破员!");
+        QMessageBox::warning(nullptr, "选择错误", "请至少选择一名井下爆破员!");
         return;
     }
 
     if (selectedOperators.isEmpty()) {
-        QMessageBox::warning(nullptr, "选择错误", "请至少选择一名操作员!");
+        QMessageBox::warning(nullptr, "选择错误", "请至少选择一名井上爆破员!");
         return;
     }
 
@@ -274,7 +274,7 @@ void ProjectDialog::setFormData(const HProject &Project) {
         ui->editRegCount->setText(Project.getBlastCount());
         ui->level4Address->setText(Project.getLevel4Address());
 
-        // 设置爆破员多选
+        // 设置井下爆破员多选
         QStringList blasterNames = Project.getBlasterName().split(", ");
         QStringList blasterIdList = Project.getBlasterIdentity().split(",");
         QStandardItemModel *blastModel = qobject_cast<QStandardItemModel *>(ui->comboBoxBlast->model());
@@ -287,7 +287,7 @@ void ProjectDialog::setFormData(const HProject &Project) {
             }
         }
 
-        // 设置操作员多选
+        // 设置井上爆破员多选
         QStringList operatorNames = Project.getOperatorName().split(", ");
         QStringList operatorIdList = Project.getOperatorIdentity().split(",");
         QStandardItemModel *operatorModel = qobject_cast<QStandardItemModel *>(ui->comboBoxOperator->model());
@@ -381,7 +381,7 @@ void ProjectDialog::updateSelectedBlasters() {
 
     // 更新显示的文本
     if (selectedBlasters.isEmpty()) {
-        ui->comboBoxBlast->setEditText("请选择爆破员");
+        ui->comboBoxBlast->setEditText("请选择井下爆破员");
     } else {
         ui->comboBoxBlast->setEditText(selectedBlasters.join(", "));
     }
@@ -404,7 +404,7 @@ void ProjectDialog::updateSelectedOperators() {
 
     // 更新显示的文本
     if (selectedOperators.isEmpty()) {
-        ui->comboBoxOperator->setEditText("请选择操作员");
+        ui->comboBoxOperator->setEditText("请选择井上爆破员");
     } else {
         ui->comboBoxOperator->setEditText(selectedOperators.join(", "));
     }

+ 2 - 2
blastProject/projectdialog.ui

@@ -49,7 +49,7 @@
      <item row="3" column="0">
       <widget class="QLabel" name="labOperaName">
        <property name="text">
-        <string>操作员:</string>
+        <string>井上爆破员:</string>
        </property>
       </widget>
      </item>
@@ -59,7 +59,7 @@
      <item row="4" column="0">
       <widget class="QLabel" name="labBlastName">
        <property name="text">
-        <string>爆破员:</string>
+        <string>井下爆破员:</string>
        </property>
       </widget>
      </item>

+ 2 - 2
blastopepage.cpp

@@ -260,8 +260,8 @@ void BlastOpePage::loadDataAndDrawTable(int currentPage, int pageSize) {
     headers = {
         {"选择", ""},
         {"工程名称", "name"},
-        {"操作员", "operatorName"},
-        {"爆破员", "blasterName"},
+        {"井上爆破员", "operatorName"},
+        {"井下爆破员", "blasterName"},
         {"井下地址", "addressPath"},
         {"雷管数量", "detSum"},
         {"起爆器数量", "blastCount"},