Sfoglia il codice sorgente

fix:"优化国家选择功能"

soobin 1 mese fa
parent
commit
65740d030d

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "shenze-vue3-app",
-  "version": "1.5.826",
+  "version": "1.5.904",
   "private": true,
   "scripts": {
     "start": "vue-cli-service serve",

+ 2 - 2
public/version.json

@@ -1,5 +1,5 @@
 {
-  "version": "1.5.826",
-  "timestamp": "2025-08-25T16:05:15.044",
+  "version": "1.5.904",
+  "timestamp": "2025-09-04T09:19:14.384",
   "commitHash": "dev-build"
 }

+ 5 - 0
src/assets/language/zh.json

@@ -1664,6 +1664,11 @@
     "D419": "柜内允许做糖温度误差",
     "D435": "柜内允许做糖湿度误差",
     "D442": "炉头N秒后进入低功耗",
+    "D443": "炉头N秒后进入待机",
+    "D244": "保温ON",
+    "D245": "保温OFF",
+    "M511": "保温逻辑",
+    "M527": "停转逻辑",
     "D444": "基准系数",
     "D445": "基准湿度",
     "D460": "低温环境设定(炉头升柜温)",

+ 6 - 1
src/service/device/index.js

@@ -78,6 +78,11 @@ export function deviceTuoji(params) {
   );
 }
 
+// 新版系统脱机
+export function offline(params) {
+  return axios.post(`/SZWL-SERVER/tEquipment/offline`, params);
+}
+
 // 音量调解
 export function updateVolume(params) {
   return axios.post(`/SZWL-SERVER/tEquipment/changeVolume`, params);
@@ -189,7 +194,7 @@ export function getParameters(params) {
 
 // 修改参数设置
 export function updateParameters(params) {
-  return axios.post(`/SZWL-SERVER/tParameters/updateParameters`, params);
+  return axios.post(`/SZWL-SERVER/tEquipment/updateParameters`, params);
 }
 
 // 修改湿度区间参数

+ 466 - 73
src/views/apkManage/add.vue

@@ -1,105 +1,235 @@
 <template>
-  <div class="addIdx">
-    <s-header :name="titleName" :noback="false"></s-header>
-    <van-form show-error-message @submit="onSubmit">
-      <div class="cust_vantBorder">
-        <div class="kBordBott">
-          <van-field type="number" colon :border="false" required v-model="cofficentForm.version" clearable name="version"
-            :label="$t('apkManage.add.version')" :placeholder="$t('apkManage.add.versionPlace')" :rules="[
-              {
-                required: true,
-                message: $t('apkManage.add.versionPlace'),
-              },
-            ]" />
-        </div>
-        <div class="kBordBott">
-          <van-field colon :border="false" required v-model="cofficentForm.versionName" clearable name="versionName"
-            :label="$t('apkManage.add.versionName')" :placeholder="$t('apkManage.add.versionNamePlace')" :rules="[
-              {
-                required: true,
-                message: $t('apkManage.add.versionNamePlace'),
-              },
-            ]" />
-        </div>
-        <div class="kBordBott">
-          <van-field colon :border="false" required @click-input="busiInpClk" readonly clearable
-            v-model="cofficentForm.modelName" name="modelName" :label="$t('apkManage.add.model')"
-            :placeholder="$t('apkManage.add.modelPlace')" :rules="[
+  <div class="apk-form-page">
+    <!-- 自定义头部 -->
+    <s-header :name="titleName" :noback="false" class="form-header" />
+
+    <!-- 表单区域 -->
+    <van-form @submit="onSubmit" class="apk-form" :show-error-message="true">
+      <!-- 基本信息卡片 -->
+      <div class="form-card">
+        <div class="card-content">
+          <!-- 版本号 -->
+          <van-field
+            v-model="cofficentForm.version"
+            type="number"
+            clearable
+            required
+            colon
+            :border="false"
+            name="version"
+            :label="$t('apkManage.add.version')"
+            :placeholder="$t('apkManage.add.versionPlace')"
+            :rules="[
+              { required: true, message: $t('apkManage.add.versionPlace') },
+            ]"
+          >
+            <template #left-icon>
+              <van-icon name="label" class="field-icon" />
+            </template>
+          </van-field>
+
+          <!-- 版本名称 -->
+          <van-field
+            v-model="cofficentForm.versionName"
+            clearable
+            required
+            colon
+            :border="false"
+            name="versionName"
+            :label="$t('apkManage.add.versionName')"
+            :placeholder="$t('apkManage.add.versionNamePlace')"
+            :rules="[
+              { required: true, message: $t('apkManage.add.versionNamePlace') },
+            ]"
+          >
+            <template #left-icon>
+              <van-icon name="edit" class="field-icon" />
+            </template>
+          </van-field>
+
+          <!-- 设备型号 -->
+          <van-field
+            colon
+            :border="false"
+            required
+            @click-input="busiInpClk"
+            readonly
+            clearable
+            v-model="cofficentForm.modelName"
+            name="modelName"
+            :label="$t('apkManage.add.model')"
+            :placeholder="$t('apkManage.add.modelPlace')"
+            :rules="[
               {
                 required: true,
                 message: $t('apkManage.add.modelPlace'),
                 trigger: ['onChange', 'onSubmit'],
               },
-            ]">
+            ]"
+          >
+            <template #left-icon>
+              <van-icon name="star" class="field-icon" />
+            </template>
+
             <template #right-icon>
-              <div class="l-flex-RC">
-                <van-icon v-if="cofficentForm.modelName" @click="
-                  cofficentForm.modelName = '';
-                cofficentForm.model = '';
-                " class="o-mr-6" name="clear" />
-                <van-icon @click="busiInpClk" name="arrow-down" />
+              <div class="field-actions">
+                <van-icon
+                  v-if="cofficentForm.modelName"
+                  name="clear"
+                  class="clear-icon"
+                  @click="
+                    cofficentForm.modelName = '';
+                    cofficentForm.model = '';
+                  "
+                />
+                <van-icon
+                  @click="busiInpClk"
+                  name="arrow-down"
+                  class="arrow-icon"
+                />
               </div>
             </template>
           </van-field>
         </div>
       </div>
-      <div class="kBordBott">
-        <van-field colon :border="false" required clearable name="isForce" :label="$t('apkManage.add.forceUpdate')"
-          :placeholder="$t('apkManage.add.forceUpdatePlace')" :rules="[
-            {
-              required: true,
-              message: $t('apkManage.add.forceUpdatePlace'),
-              trigger: ['onChange', 'onSubmit'],
-            },
-          ]">
-          <template #input>
-            <van-radio-group v-model="cofficentForm.isForce" direction="horizontal">
-              <van-radio name="true">{{ $t('apkManage.add.yes') }}</van-radio>
-              <van-radio name="false">{{ $t('apkManage.add.no') }}</van-radio>
-            </van-radio-group>
-          </template>
-        </van-field>
-      </div>
-      <div class="cust_vantBorder">
-        <div class="kBordBott">
-          <van-field type="number" colon :border="false" required v-model="cofficentForm.apkSize" clearable name="apkSize"
-            :label="$t('apkManage.add.apkSize')" :placeholder="$t('apkManage.add.apkSizePlace')" :rules="[
+
+      <!-- 更新设置卡片 -->
+      <div class="form-card">
+        <div class="card-content">
+          <!-- 强制更新 -->
+          <van-field
+            colon
+            :border="false"
+            required
+            clearable
+            name="isForce"
+            :label="$t('apkManage.add.forceUpdate')"
+            :placeholder="$t('apkManage.add.forceUpdatePlace')"
+            :rules="[
               {
                 required: true,
-                message: $t('apkManage.add.apkSizePlace'),
+                message: $t('apkManage.add.forceUpdatePlace'),
+                trigger: ['onChange', 'onSubmit'],
               },
-            ]" />
+            ]"
+          >
+            <template #left-icon>
+              <van-icon name="fire" class="field-icon" />
+            </template>
+            <template #input>
+              <van-radio-group
+                v-model="cofficentForm.isForce"
+                direction="horizontal"
+              >
+                <van-radio name="true">{{ $t("apkManage.add.yes") }}</van-radio>
+                <van-radio name="false">{{ $t("apkManage.add.no") }}</van-radio>
+              </van-radio-group>
+            </template>
+          </van-field>
         </div>
-        <div class="kBordBott">
-          <van-field colon :border="false" required v-model="cofficentForm.downloadUrl" clearable name="downloadUrl"
-            :label="$t('apkManage.add.downloadLink')" :placeholder="$t('apkManage.add.downloadLinkPlace')" :rules="[
+      </div>
+
+      <!-- 文件信息卡片 -->
+      <div class="form-card">
+        <div class="card-content">
+          <!-- APK大小 -->
+          <van-field
+            v-model="cofficentForm.apkSize"
+            type="number"
+            clearable
+            required
+            colon
+            :border="false"
+            name="apkSize"
+            :label="$t('apkManage.add.apkSize')"
+            :placeholder="$t('apkManage.add.apkSizePlace')"
+            :rules="[
+              { required: true, message: $t('apkManage.add.apkSizePlace') },
+            ]"
+          >
+            <template #left-icon>
+              <van-icon name="diamond" class="field-icon" />
+            </template>
+            <template #extra>
+              <span class="unit">MB</span>
+            </template>
+          </van-field>
+
+          <!-- 下载链接 -->
+          <van-field
+            v-model="cofficentForm.downloadUrl"
+            clearable
+            required
+            colon
+            :border="false"
+            name="downloadUrl"
+            type="textarea"
+            :label="$t('apkManage.add.downloadLink')"
+            :placeholder="$t('apkManage.add.downloadLinkPlace')"
+            :rules="[
               {
                 required: true,
                 message: $t('apkManage.add.downloadLinkPlace'),
               },
-            ]" />
-        </div>
-        <div class="kBordBott">
-          <van-field colon :border="false" required v-model="cofficentForm.versionInfo" clearable name="versionInfo"
-            :label="$t('apkManage.add.versionIntroduction')" :placeholder="$t('apkManage.add.versionIntroductionPlace')"
+            ]"
+          >
+            <template #left-icon>
+              <van-icon name="weapp-nav" class="field-icon" />
+            </template>
+          </van-field>
+
+          <!-- 版本介绍 -->
+          <van-field
+            v-model="cofficentForm.versionInfo"
+            clearable
+            required
+            colon
+            :border="false"
+            name="versionInfo"
+            :label="$t('apkManage.add.versionIntroduction')"
+            :placeholder="$t('apkManage.add.versionIntroductionPlace')"
             :rules="[
               {
                 required: true,
                 message: $t('apkManage.add.versionIntroductionPlace'),
               },
-            ]" />
+            ]"
+            type="textarea"
+            rows="3"
+            autosize
+          >
+            <template #left-icon>
+              <van-icon name="notes" class="field-icon" />
+            </template>
+          </van-field>
         </div>
       </div>
-      <div style="margin: 16px">
-        <van-button round block type="primary" native-type="submit">
+
+      <!-- 提交按钮 -->
+      <div class="form-actions">
+        <van-button
+          round
+          block
+          type="primary"
+          native-type="submit"
+          class="submit-button"
+        >
+          <van-icon name="success" class="button-icon" />
           {{ titleName }}
         </van-button>
       </div>
     </van-form>
+
     <!-- 型号选择框 -->
     <van-popup v-model:show="busiPopShow" position="bottom">
-      <van-picker v-model="busiDefaIdx" :title="$t('apkManage.add.version')" :columns="busiPopList"
-        :columns-field-names="busiPopFieldName" @confirm="busiPopConfirm" @cancel="busiPopShow = false" />
+      <van-picker
+        v-model="busiDefaIdx"
+        :title="$t('apkManage.add.model')"
+        :columns="busiPopList"
+        :columns-field-names="busiPopFieldName"
+        @confirm="busiPopConfirm"
+        @cancel="busiPopShow = false"
+      />
     </van-popup>
   </div>
 </template>
@@ -122,14 +252,14 @@ export default {
     const route = useRoute();
     onMounted(() => {
       // 加载样式
-      styleUrl('apkManage');
+      styleUrl("apkManage");
       const row = route.query.row ? JSON.parse(route.query.row) : {};
       // 看路径有没有id,有就是编辑
       if (row.id) {
         titleName.value = t("apkManage.add.editTitle");
         cofficentForm.value = row;
         // 转换成字符串
-        cofficentForm.value.isForce = cofficentForm.value.isForce + '';
+        cofficentForm.value.isForce = cofficentForm.value.isForce + "";
         cofficentForm.value.modelName = row.model;
         busiDefaIdx.value = [row.model];
       }
@@ -283,10 +413,273 @@ export default {
       busiPopFieldName,
       busiInpClk,
       busiPopConfirm,
-      busiDefaIdx
+      busiDefaIdx,
     };
   },
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+@primary-color: #4d6add;
+@card-bg: #ffffff;
+@text-dark: #333;
+@text-light: #666;
+@border-color: #e4e7ec;
+@shadow-color: rgba(77, 106, 221, 0.1);
+
+.apk-form-page {
+  min-height: 100vh;
+  background-color: #f5f8ff;
+  padding-bottom: 20px;
+}
+
+.form-header {
+  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
+}
+
+.apk-form {
+  padding: 16px;
+}
+
+.form-card {
+  background-color: @card-bg;
+  border-radius: 16px;
+  margin-bottom: 16px;
+  box-shadow: 0 4px 12px @shadow-color;
+  overflow: hidden;
+
+  .card-header {
+    display: flex;
+    align-items: center;
+    padding: 16px;
+    background-color: #f9fbfe;
+    border-bottom: 1px solid @border-color;
+
+    .header-icon {
+      font-size: 20px;
+      color: @primary-color;
+      margin-right: 10px;
+    }
+
+    .card-title {
+      font-size: 16px;
+      font-weight: 600;
+      color: @text-dark;
+    }
+  }
+
+  .card-content {
+    padding: 0 16px;
+  }
+}
+
+.van-field {
+  padding: 16px 0;
+  border-bottom: 1px solid @border-color;
+
+  &:last-child {
+    border-bottom: none;
+  }
+
+  :deep(.van-field__label) {
+    font-weight: 500;
+    color: @text-dark;
+  }
+
+  :deep(.van-field__control) {
+    font-size: 15px;
+    color: @text-dark;
+  }
+
+  .field-icon {
+    font-size: 20px;
+    color: @primary-color;
+    margin-right: 10px;
+  }
+
+  .field-actions {
+    display: flex;
+    align-items: center;
+
+    .clear-icon {
+      color: #999;
+      font-size: 18px;
+      margin-right: 8px;
+      padding: 4px;
+
+      &:active {
+        color: @primary-color;
+      }
+    }
+
+    .arrow-icon {
+      color: #999;
+      font-size: 18px;
+    }
+  }
+
+  .unit {
+    color: @text-light;
+    font-size: 14px;
+    margin-left: 4px;
+  }
+}
+
+.radio-group {
+  width: 100%;
+  display: flex;
+  justify-content: space-between;
+
+  .van-radio {
+    flex: 1;
+    margin-right: 15px;
+
+    &:last-child {
+      margin-right: 0;
+    }
+  }
+
+  .radio-label {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    height: 36px;
+    border-radius: 8px;
+    background-color: #f5f7fa;
+    font-size: 14px;
+    padding: 0 15px;
+
+    .van-icon {
+      margin-right: 5px;
+      color: @primary-color;
+    }
+  }
+
+  .van-radio__icon--checked + .radio-label {
+    background-color: #e8ecff;
+    color: @primary-color;
+    font-weight: 500;
+  }
+}
+
+.copy-btn {
+  background: linear-gradient(to right, #4d6add, #6a89ff);
+  color: white;
+  border: none;
+  height: 28px;
+  padding: 0 12px;
+  font-size: 12px;
+
+  .van-icon {
+    margin-right: 4px;
+  }
+}
+
+.form-actions {
+  padding: 0 16px;
+  margin-top: 20px;
+
+  .submit-button {
+    height: 50px;
+    background: linear-gradient(to right, #4d6add, #6a89ff);
+    border: none;
+    font-size: 16px;
+    font-weight: 500;
+    box-shadow: 0 6px 16px rgba(77, 106, 221, 0.3);
+
+    .button-icon {
+      margin-right: 8px;
+    }
+  }
+}
+
+.model-popup {
+  border-radius: 16px 16px 0 0;
+  overflow: hidden;
+
+  .popup-header {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    padding: 16px;
+    background-color: @card-bg;
+    border-bottom: 1px solid @border-color;
+
+    .popup-title {
+      font-size: 16px;
+      font-weight: 600;
+      color: @text-dark;
+    }
+
+    .close-icon {
+      font-size: 20px;
+      color: @text-light;
+      padding: 4px;
+    }
+  }
+
+  .picker-toolbar {
+    display: flex;
+    justify-content: space-between;
+    padding: 16px;
+    background-color: @card-bg;
+    border-bottom: 1px solid @border-color;
+
+    .cancel-btn {
+      background-color: #f5f7fa;
+      color: @text-dark;
+      border: none;
+    }
+
+    .confirm-btn {
+      background: linear-gradient(to right, #4d6add, #6a89ff);
+      border: none;
+    }
+  }
+}
+
+.van-toast {
+  display: flex;
+  align-items: center;
+  padding: 10px 16px;
+  border-radius: 20px;
+  background-color: rgba(0, 0, 0, 0.7);
+
+  .van-icon {
+    margin-right: 8px;
+    color: #07c160;
+  }
+
+  .toast-text {
+    color: white;
+    font-size: 14px;
+  }
+}
+
+@media (max-width: 480px) {
+  .apk-form {
+    padding: 12px;
+  }
+
+  .form-card {
+    margin-bottom: 12px;
+
+    .card-header {
+      padding: 12px;
+    }
+
+    .card-content {
+      padding: 0 12px;
+    }
+  }
+
+  .van-field {
+    padding: 12px 0;
+  }
+
+  .submit-button {
+    height: 46px !important;
+    font-size: 15px !important;
+  }
+}
+</style>

+ 414 - 108
src/views/apkManage/index.vue

@@ -1,128 +1,174 @@
 <template>
-  <div class="advertRuleIdx">
-    <s-header :name="$t('apkManage.apkManagement')" :noback="false"></s-header>
-    <div
-      v-if="isDelete"
-      class="headCon l-flex-between o-plr-20 o-pt-26 o-pb-12 kBordBott"
-    >
-      <div class="l-flex-RC c-text-15 c-text-color c-text-b">
-        {{ $t("advertManage.advertRule.selected") }}
-        {{ selectTotals }}
-        {{ $t("advertManage.advertRule.individual") }}
-      </div>
-      <div class="l-flex-RC">
-        <div @click="cancelClk" class="c-text-c c-text-13 c-color">
-          {{ $t("advertManage.advertRule.cancel") }}
-        </div>
-        <div
-          @click="noticeClk"
-          class="c-text-c o-ml-24 c-text-13"
-          style="color: #df5e4c"
-        >
-          {{ $t("advertManage.advertRule.confirmDel") }}
+  <div class="apk-management-page">
+    <!-- 自定义头部 -->
+    <s-header
+      :name="$t('apkManage.apkManagement')"
+      :noback="false"
+      class="management-header"
+    />
+
+    <!-- 操作栏 -->
+    <div class="action-bar">
+      <div v-if="isDelete" class="delete-mode-bar">
+        <div class="selected-count">
+          <van-icon name="checked" color="#df5e4c" />
+          <span>{{ $t("advertManage.advertRule.selected") }}</span>
+          <span class="count-highlight">{{ selectTotals }}</span>
+          <span>{{ $t("advertManage.advertRule.individual") }}</span>
         </div>
-      </div>
-    </div>
-    <div
-      v-else
-      class="headCon l-flex-between o-plr-20 o-pt-26 o-pb-12 kBordBott"
-    >
-      <div class="l-flex-RC">
-        <div class="ruleIcon"></div>
-        <div class="c-text-color c-text-b c-text-15">
-          {{ $t("advertManage.advertRule.total") }}
-          <span class="c-text-20" style="color: #df5e4c">{{ ruleTotal }}</span>
-          {{ $t("alarmHistory.recordsTotal") }}
+        <div class="action-buttons">
+          <van-button round size="small" class="cancel-btn" @click="cancelClk">
+            {{ $t("advertManage.advertRule.cancel") }}
+          </van-button>
+          <van-button
+            round
+            size="small"
+            type="danger"
+            class="delete-btn"
+            @click="noticeClk"
+          >
+            {{ $t("advertManage.advertRule.confirmDel") }}
+          </van-button>
         </div>
       </div>
-      <div class="l-flex-RC">
-        <div @click="toAdd" class="c-text-c">
-          <div>
-            <van-icon size="18" name="add-o" />
-          </div>
-          <div class="c-text-color c-text-12">
-            {{ $t("advertManage.advertRule.add") }}
-          </div>
+
+      <div v-else class="normal-mode-bar">
+        <div class="total-info">
+          <van-icon name="description" color="#4d6add" />
+          <span class="total-text">{{
+            $t("advertManage.advertRule.total")
+          }}</span>
+          <span class="total-count">{{ ruleTotal }}</span>
+          <span class="total-text">{{ $t("alarmHistory.recordsTotal") }}</span>
         </div>
-        <div @click="isDelete = true" class="c-text-c o-ml-24">
-          <div>
-            <van-icon size="18" name="close" />
+
+        <div class="action-icons" v-if="user.type === 0">
+          <div class="action-item" @click="toAdd">
+            <van-button
+              icon="plus"
+              size="small"
+              class="add-btn"
+              @click="toAdd"
+              color="#4d6add"
+            >
+              {{ $t("advertManage.advertRule.add") }}
+            </van-button>
           </div>
-          <div class="c-text-color c-text-12">
-            {{ $t("advertManage.advertRule.delete") }}
+          <div class="action-item" @click="isDelete = true">
+            <van-button
+              icon="delete"
+              size="small"
+              type="danger"
+              plain
+              class="delete-btn"
+              @click="isDelete = true"
+            >
+              {{ $t("advertManage.advertRule.delete") }}
+            </van-button>
           </div>
         </div>
       </div>
     </div>
-    <van-tabs v-model:active="active" @click-tab="clickModel">
-      <van-tab :title="$t('device.whole')" name="" />
-      <van-tab
-        v-for="item in modelList"
-        :key="item.id"
-        :title="item.name"
-        :name="item.id"
-      />
-    </van-tabs>
-    <div class="contentCon">
-      <van-pull-refresh disabled v-model="refreshing" @refresh="onRefresh">
-        <van-list
-          v-model="loading"
-          :finished="finished"
-          :finished-text="$t('common.noMoreTxt')"
-          @load="onLoad"
-          :offset="20"
-          :immediate-check="false"
+
+    <!-- 设备类型标签 -->
+    <div class="model-tabs">
+      <van-tabs
+        v-model:active="active"
+        @click-tab="clickModel"
+        animated
+        swipeable
+      >
+        <van-tab :title="$t('device.whole')" name="" />
+        <van-tab
+          v-for="item in modelList"
+          :key="item.id"
+          :title="item.name"
+          :name="item.id"
+        />
+      </van-tabs>
+    </div>
+
+    <!-- 内容区域 -->
+    <div class="content-container">
+      <van-list
+        v-model="loading"
+        :finished="finished"
+        :finished-text="$t('common.noMoreTxt')"
+        @load="onLoad"
+        :offset="20"
+      >
+        <div
+          v-for="item in tableData"
+          :key="item.id"
+          class="apk-card"
+          :class="{ 'card-selected': item.checked }"
         >
-          <div
-            @click.self="toEdit(item)"
-            v-for="item in tableData"
-            :key="item.id"
-            class="o-plr-20 o-pt-24 o-pb-12 l-flex-between kBordBott content"
-          >
-            <div>
-              <div class="l-flex-RC">
-                <span class="c-color c-text-12"
-                  >{{ $t("apkManage.version") }}:</span
-                >
-                <span class="c-text-color c-text-12">{{ item.version }}</span>
+          <div class="card-content">
+            <div class="apk-info">
+              <div class="info-row">
+                <van-icon name="info" class="info-icon" />
+                <span class="info-label">{{ $t("apkManage.version") }}:</span>
+                <span class="info-value">{{ item.version }}</span>
               </div>
-              <div class="l-flex-RC">
-                <span class="c-color c-text-12"
+
+              <div class="info-row">
+                <van-icon name="info" class="info-icon" />
+                <span class="info-label"
                   >{{ $t("apkManage.versionInfo") }}:</span
                 >
-                <span class="c-text-color c-text-12">{{
-                  item.versionName
-                }}</span>
+                <span class="info-value">{{ item.versionName }}</span>
               </div>
-              <div class="l-flex-RC">
-                <span class="c-color c-text-12"
-                  >{{ $t("apkManage.model") }}:</span
-                >
-                <span class="c-text-color c-text-12">{{ item.model }}</span>
+
+              <div class="info-row">
+                <van-icon name="phone" class="info-icon" />
+                <span class="info-label">{{ $t("apkManage.model") }}:</span>
+                <span class="info-value">{{ item.model }}</span>
               </div>
-              <div class="l-flex-RC">
-                <span class="c-color c-text-12"
+
+              <div class="info-row">
+                <van-icon name="clock" class="info-icon" />
+                <span class="info-label"
                   >{{ $t("advertManage.advertRule.createTime") }}:</span
                 >
-                <span class="c-text-color c-text-12">{{
-                  Format_time(item.createDate)
+                <span class="info-value">{{
+                  Format_time(item.modifyDate)
                 }}</span>
               </div>
             </div>
-            <div class="rightCon">
+
+            <div class="card-actions" v-if="user.type === 0">
               <template v-if="isDelete">
-                <van-checkbox v-model="item.checked">{{ " " }}</van-checkbox>
+                <van-checkbox v-model="item.checked" shape="square" />
               </template>
               <template v-else>
-                <div @click="toEdit(item)" class="editBtn c-text-14">
+                <van-button
+                  round
+                  size="small"
+                  class="edit-btn"
+                  @click="toEdit(item)"
+                >
+                  <van-icon name="edit" size="14" />
                   {{ $t("advertManage.advertRule.edit") }}
-                </div>
+                </van-button>
               </template>
             </div>
+
+            <div class="card-actions">
+              <van-button
+                round
+                size="small"
+                class="down-btn"
+                @click="copyApkLink(item)"
+              >
+                <van-icon name="down" size="14" />
+                复制apk链接
+              </van-button>
+            </div>
           </div>
-        </van-list>
-      </van-pull-refresh>
+        </div>
+      </van-list>
     </div>
+
     <!-- 删除确认弹窗 -->
     <kDialog
       :dialogTitle="$t('advertManage.delPopTitle')"
@@ -131,8 +177,7 @@
       ref="kDialogRef"
       :dialogContent="$t('advertManage.delPopContent')"
       @confirmclk="confirmClk"
-    >
-    </kDialog>
+    />
   </div>
 </template>
 
@@ -146,11 +191,12 @@ import sHeader from "@/components/SimpleHeader";
 import { useRouter } from "vue-router";
 import { showToast } from "vant";
 import { useI18n } from "vue-i18n";
-import { styleUrl } from "../../common/js/utils";
+import { getLoginUser, styleUrl } from "../../common/js/utils";
 export default {
   components: { sHeader, kDialog },
   setup() {
     const { t } = useI18n();
+    const user = getLoginUser();
     // 点击标签
     const active = ref("");
     // 机型列表
@@ -195,10 +241,6 @@ export default {
         name: "EF210",
         id: "EF210",
       },
-      {
-        name: "lua",
-        id: "lua",
-      },
     ]);
     // 删除确认弹窗
     const kDialogRef = ref(null);
@@ -300,10 +342,6 @@ export default {
       model: "",
     });
     const getList = () => {
-      // let param = {
-      //   current: pageNo.value,
-      //   size: pageSize.value,
-      // };
       param.value.current = pageNo.value;
       param.value.size = pageSize.value;
       Api_getPageApkInfo(param.value).then((res) => {
@@ -343,6 +381,11 @@ export default {
         router.push(`/apkManageAdd?row=${JSON.stringify(row)}`);
       }
     };
+    // 点击复制链接
+    const copyApkLink = (row) => {
+      navigator.clipboard.writeText(row.downloadUrl);
+      showToast("复制成功");
+    };
     // 点击标签
     const clickModel = (item) => {
       console.log(item);
@@ -374,9 +417,272 @@ export default {
       modelList,
       active,
       clickModel,
+      user,
+      copyApkLink,
     };
   },
 };
 </script>
 
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+@primary-color: #4d6add;
+@danger-color: #df5e4c;
+@success-color: #07c160;
+@card-bg: #ffffff;
+@text-dark: #333;
+@text-light: #666;
+@border-color: #e4e7ec;
+@shadow-color: rgba(77, 106, 221, 0.1);
+
+.apk-management-page {
+  min-height: 100vh;
+  background-color: #f5f8ff;
+  padding-bottom: 20px;
+}
+
+.management-header {
+  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
+}
+
+.action-bar {
+  background-color: @card-bg;
+  padding: 16px;
+  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
+  position: relative;
+  z-index: 10;
+}
+
+.delete-mode-bar {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 10px 5px;
+
+  .selected-count {
+    display: flex;
+    align-items: center;
+    justify-self: center;
+    font-size: 18px;
+    color: @text-dark;
+
+    .van-icon {
+      margin-right: 6px;
+    }
+
+    .count-highlight {
+      color: @danger-color;
+      font-weight: bold;
+      font-size: 20px;
+      margin: 0 4px;
+    }
+  }
+
+  .action-buttons {
+    display: flex;
+    gap: 10px;
+
+    .cancel-btn {
+      background-color: #f5f7fa;
+      color: @text-dark;
+      border: none;
+    }
+
+    .delete-btn {
+      min-width: 80px;
+    }
+  }
+}
+
+.normal-mode-bar {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 10px 5px;
+
+  .total-info {
+    display: flex;
+    align-items: center;
+    justify-self: center;
+    font-size: 18px;
+    color: @text-dark;
+
+    .van-icon {
+      margin-right: 6px;
+    }
+
+    .total-text {
+      margin: 0 4px;
+      font-size: 15px;
+    }
+
+    .total-count {
+      color: @danger-color;
+      font-weight: bold;
+      font-size: 20px;
+    }
+  }
+
+  .action-icons {
+    display: flex;
+    gap: 10px;
+
+    .action-item {
+      display: flex;
+      // flex-direction: column;
+      align-items: center;
+      cursor: pointer;
+
+      .action-label {
+        font-size: 15px;
+        color: @text-light;
+      }
+    }
+  }
+}
+
+.model-tabs {
+  background-color: @card-bg;
+  position: sticky;
+  top: 0;
+  z-index: 10;
+  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
+
+  :deep(.van-tabs__wrap) {
+    padding: 0 16px;
+  }
+
+  :deep(.van-tab) {
+    font-size: 14px;
+    padding: 0 12px;
+  }
+
+  :deep(.van-tab--active) {
+    color: @primary-color;
+    font-weight: bold;
+  }
+}
+
+.content-container {
+  padding: 16px;
+}
+
+.empty-state {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  padding: 40px 0;
+  color: @text-light;
+  font-size: 14px;
+
+  p {
+    margin-top: 12px;
+  }
+}
+
+.apk-card {
+  background-color: @card-bg;
+  border-radius: 12px;
+  margin-bottom: 16px;
+  box-shadow: 0 4px 12px @shadow-color;
+  overflow: hidden;
+  transition: all 0.3s ease;
+
+  &:hover {
+    transform: translateY(-2px);
+    box-shadow: 0 6px 16px rgba(77, 106, 221, 0.15);
+  }
+
+  &.card-selected {
+    border-left: 4px solid @danger-color;
+  }
+}
+
+.card-content {
+  display: flex;
+  padding: 16px;
+  // cursor: pointer;
+
+  .apk-info {
+    flex: 1;
+  }
+
+  .card-actions {
+    display: flex;
+    align-items: center;
+    padding-left: 12px;
+
+    .edit-btn {
+      background: linear-gradient(to right, #4d6add, #6a89ff);
+      color: white;
+      border: none;
+      padding: 0 16px;
+    }
+
+    .down-btn {
+      margin-left: 10px;
+      background: linear-gradient(to right, #4d6add, #6a89ff);
+      color: white;
+      border: none;
+      // padding: 0 16px;
+    }
+  }
+}
+
+.info-row {
+  display: flex;
+  align-items: center;
+  margin-bottom: 10px;
+  font-size: 14px;
+
+  &:last-child {
+    margin-bottom: 0;
+  }
+
+  .info-icon {
+    color: @primary-color;
+    margin-right: 8px;
+    font-size: 16px;
+  }
+
+  .info-label {
+    color: @text-light;
+    min-width: 80px;
+  }
+
+  .info-value {
+    color: @text-dark;
+    font-weight: 500;
+  }
+}
+
+.card-footer {
+  padding: 10px 16px;
+  background-color: #f9fafc;
+  border-top: 1px solid @border-color;
+}
+
+@media (max-width: 480px) {
+  .action-bar {
+    padding: 12px;
+  }
+
+  .delete-mode-bar {
+    gap: 12px;
+  }
+
+  .normal-mode-bar {
+    gap: 12px;
+  }
+
+  .card-content {
+    flex-direction: column;
+
+    .card-actions {
+      padding-left: 0;
+      padding-top: 12px;
+      justify-content: flex-end;
+    }
+  }
+}
+</style>

+ 9 - 5
src/views/device/deviceOper.vue

@@ -646,7 +646,8 @@ import {
   sleepEquipment,
   // openDoor,
   // Api_openDoor,
-  deviceTuoji,
+  // deviceTuoji,
+  offline,
   delOneDevice,
   updateLockStatus,
   restartScreen,
@@ -1094,12 +1095,15 @@ export default {
       }
       // 系统脱机
       if (operType.value === 5) {
-        const { data } = await deviceTuoji({
+        // const { data } = await deviceTuoji({
+        //   id: device.value.id,
+        //   clientId: device.value.clientId,
+        //   adminUserName: user.username,
+        // });
+        const { data } = await offline({
           id: device.value.id,
-          clientId: device.value.clientId,
-          adminUserName: user.username,
         });
-        if (data.code) {
+        if (data.code === "00000") {
           showSuccessToast(t("device.sysOffSuccess"));
           operCheckShow.value = false;
         } else {

+ 16 - 33
src/views/device/devicePassword/index.vue

@@ -144,7 +144,7 @@
 
 <script>
 // 导入接口
-import { updateDevicePassword, changePassword } from "@/service/device/index";
+import { changePassword } from "@/service/device/index";
 import sHeader from "@/components/SimpleHeader";
 import { ref, reactive } from "@vue/reactivity";
 import { onMounted } from "@vue/runtime-core";
@@ -173,7 +173,7 @@ export default {
     const checkAmdinPwd = ref();
     const guestPwd = ref();
     const checkGuestPwd = ref();
-    const equimentType = ref(route.query.equimentType || "");
+    // const equimentType = ref(route.query.equimentType || "");
 
     const validator = (val) => /\w{6,}/.test(val);
     const themeVars = {
@@ -232,37 +232,20 @@ export default {
         // title: "提示",
         message: t("device.editCheck"),
       }).then(() => {
-        if (equimentType.value == "SBM10") {
-          changePassword({
-            id: passwordForm.equipmentId,
-            adminPwd: passwordForm.adminPwd,
-            guestPwd: passwordForm.guestPwd,
-          }).then((res) => {
-            if (res.data.code == "00000") {
-              showSuccessToast(t("device.modificationSucceeded"));
-              setTimeout(() => {
-                router.go(-1);
-              }, 1500);
-            } else {
-              showFailToast(res.data.message);
-            }
-          });
-        } else {
-          updateDevicePassword({
-            equipmentId: passwordForm.equipmentId,
-            adminPwd: passwordForm.adminPwd,
-            guestPwd: passwordForm.guestPwd,
-          }).then((res) => {
-            if (res.data.code == "00000") {
-              showSuccessToast(t("device.modificationSucceeded"));
-              setTimeout(() => {
-                router.go(-1);
-              }, 1500);
-            } else {
-              showFailToast(res.data.message);
-            }
-          });
-        }
+        changePassword({
+          id: passwordForm.equipmentId,
+          adminPwd: passwordForm.adminPwd,
+          guestPwd: passwordForm.guestPwd,
+        }).then((res) => {
+          if (res.data.code == "00000") {
+            showSuccessToast(t("device.modificationSucceeded"));
+            setTimeout(() => {
+              router.go(-1);
+            }, 1500);
+          } else {
+            showFailToast(res.data.message);
+          }
+        });
       });
     };
 

+ 6 - 7
src/views/device/deviceSet.vue

@@ -169,7 +169,7 @@
           @click="clickFlowerPicker"
           class="form-item"
         >
-         <!-- <template #button>
+          <!-- <template #button>
            <van-button size="small" type="primary" @click="pushFlower">{{
              $t("advertManage.push")
            }}</van-button>
@@ -196,7 +196,7 @@
           </template>
         </van-field>
 
-        <van-field
+        <!-- <van-field
           v-model="deviceDetal.url"
           center
           autosize
@@ -211,7 +211,7 @@
               $t("device.update")
             }}</van-button>
           </template>
-        </van-field>
+        </van-field> -->
 
         <van-field
           v-model="mqttUrl"
@@ -220,7 +220,7 @@
           type="textarea"
           clearable
           class="form-item"
-          label="MQTT URL"
+          label="URL"
           :placeholder="$t('device.urlPlace')"
         >
           <template #button>
@@ -576,7 +576,7 @@ export default {
       });
     };
     // 推送花型
-    const pushFlower = ({ selectedOptions }) => { 
+    const pushFlower = ({ selectedOptions }) => {
       deviceDetal.value.flowers = selectedOptions[0].text;
       showConfirmDialog({
         title: "提醒",
@@ -598,7 +598,7 @@ export default {
             router.go(-1);
           }, 3500);
         }
-      })
+      });
     };
     // 点击优惠券开关
     const couponStatusChg = (couponStatus) => {
@@ -648,7 +648,6 @@ export default {
           showFlowerPicker.value = true;
         }
       }, 1000);
-
     };
     return {
       deviceDetal,

+ 3 - 0
src/views/register.vue

@@ -432,6 +432,7 @@ export default {
     const citiesValue = ref("");
     const showCountry = ref(false);
     const cityValue = ref("");
+    const countryValue = ref("");
     const countryOptions = ref(
       languageName.value == "zh" ? countriesData : countriesDataEn
     );
@@ -446,6 +447,7 @@ export default {
     });
     const onConfirmCountry = ({ selectedOptions }) => {
       cityValue.value = selectedOptions.map((option) => option.text).join("/");
+      countryValue.value = selectedOptions[0]?.value;
       citiesValue.value = selectedOptions[1]?.value;
       showCountry.value = false;
     };
@@ -484,6 +486,7 @@ export default {
         code: code.value,
         companyType: "0",
         inviteCode: inviteCode.value,
+        country: countryValue.value,
         cities: citiesValue.value,
       });
 

+ 3 - 16
src/views/user.vue

@@ -790,7 +790,6 @@ export default {
     // 获取申泽支付平台
     const getSunzeeDetail = () => {
       getAdmin({ id: 2738 }).then((res) => {
-        // sunzeePay.value = res.data.data.payPlatform;
         if (res.data.data.payPlatform == "1") {
           sunzeePay.value = true;
         }
@@ -799,7 +798,6 @@ export default {
     // 获取七云支付平台
     const getSevenCloudDetail = () => {
       getAdmin({ id: 2739 }).then((res) => {
-        // sevencloudPay.value = res.data.data.payPlatform;
         if (res.data.data.payPlatform == "1") {
           sevencloudPay.value = true;
         }
@@ -809,11 +807,6 @@ export default {
     const confirmClk = () => {
       // 获取缓存的语言
       const savedCredentials = localStorage.getItem("savedCredentials");
-      // const curLang = localStorage.getItem("curLang");
-      // const appVersion = localStorage.getItem("appVersion");
-      // 清空缓存
-      // localStorage.clear();
-      // localStorage.setItem("curLang", curLang);
       localStorage.removeItem("loginUser");
       if (savedCredentials) {
         localStorage.setItem("savedCredentials", savedCredentials);
@@ -988,15 +981,6 @@ export default {
         message: t("user.logOutContent"),
       })
         .then(() => {
-          // 获取缓存的语言
-          // const savedCredentials = localStorage.getItem("savedCredentials");
-          // const curLang = localStorage.getItem("curLang");
-          // 清空缓存
-          // localStorage.clear();
-          // localStorage.setItem("curLang", curLang);
-          // if (savedCredentials) {
-          //   localStorage.setItem("savedCredentials", savedCredentials);
-          // }
           localStorage.removeItem("loginUser");
           if (sys.value) {
             setTimeout(() => {
@@ -1085,6 +1069,7 @@ export default {
     const fieldValue = ref("");
     // 地区参数值
     const areaValue = ref("");
+    const country = ref("");
     const onConfirmArea = async ({ selectedOptions }) => {
       if (selectedOptions[0]?.text == selectedOptions[1]?.text) {
         fieldValue.value = selectedOptions[0]?.text;
@@ -1122,10 +1107,12 @@ export default {
           .map((option) => option.text)
           .join("/");
       }
+      country.value = selectedOptions[0]?.value;
       areaValue.value = selectedOptions[1]?.value;
       const params = {
         adminId: user.id,
         areaValue: areaValue.value,
+        country: country.value,
       };
       const { data } = await updateArea(params);
       if (data.code === "00000") {