Ver Fonte

feat:“同步2024.02.26”

soobin há 1 ano atrás
pai
commit
280e18e55a
40 ficheiros alterados com 2261 adições e 201 exclusões
  1. 2 1
      src/App.vue
  2. 0 0
      src/assets/device/operIcon/materialMonitorOff.png
  3. 30 13
      src/assets/language/en.json
  4. 1524 0
      src/assets/language/ja.json
  5. 36 19
      src/assets/language/zh.json
  6. BIN
      src/assets/order/spunSugar/goods/A49.png
  7. BIN
      src/assets/order/spunSugar/goods/A50.png
  8. BIN
      src/assets/order/spunSugar/goods/A67.png
  9. BIN
      src/assets/order/spunSugar/goods/A68.png
  10. BIN
      src/assets/order/spunSugar/goods/A69.png
  11. BIN
      src/assets/order/spunSugar/goods/A70.png
  12. BIN
      src/assets/user/feedback.png
  13. 8 2
      src/common/js/utils.js
  14. 39 4
      src/components/commom/kSelectPop/index.vue
  15. 2 1
      src/main.js
  16. 7 0
      src/router/index.js
  17. 10 0
      src/service/device/index.js
  18. 9 9
      src/service/labelMan/index.js
  19. 5 0
      src/styles/device/index.less
  20. 3 3
      src/styles/home/index.less
  21. 6 0
      src/styles/labelMan/index.less
  22. 8 3
      src/styles/login/index.less
  23. 13 0
      src/styles/paramsSet/index.less
  24. 11 0
      src/styles/user/index.less
  25. 30 26
      src/utils/i18n.js
  26. 0 6
      src/views/accountOperation/index.vue
  27. 17 17
      src/views/accountPer/add.vue
  28. 38 7
      src/views/device/deviceOper.vue
  29. 38 1
      src/views/device/deviceSearch.vue
  30. 53 8
      src/views/device/deviceSet.vue
  31. 71 10
      src/views/device/index.vue
  32. 73 9
      src/views/device/paramsSet/paramsSetInfo.vue
  33. 41 0
      src/views/feedback.vue
  34. 21 5
      src/views/home/index.vue
  35. 39 13
      src/views/labelMan/add.vue
  36. 8 10
      src/views/labelMan/index.vue
  37. 82 28
      src/views/login.vue
  38. 1 0
      src/views/merchantManage/index.vue
  39. 28 6
      src/views/robotRanking.vue
  40. 8 0
      src/views/user.vue

+ 2 - 1
src/App.vue

@@ -109,7 +109,8 @@ body,
 div,
 span,
 p {
-  // color: #404d74 !important;
+  // color: #333333;
+  font-family: "Arial", sans-serif;
 }
 
 html {

src/assets/device/operIcon/监控数据.png → src/assets/device/operIcon/materialMonitorOff.png


+ 30 - 13
src/assets/language/en.json

@@ -146,6 +146,7 @@
     "confirmDel": "confirm deletion",
     "delPopContent": "Are you sure to delete?",
     "delTips": "Please select the data to be deleted first",
+    "delSuccess": "Successfully deleted",
     "advertRule": {
       "sysTitle": "Advertising rules",
       "total": "Total ",
@@ -236,6 +237,9 @@
   },
   "device": {
     "managementCenter": "Machine Management Center",
+    "whole": "All",
+    "group": "Group management",
+    "addGroup": "Add Group",
     "setAlarm": "Set alarm",
     "equipmentName": "Machine name",
     "equipmentNameTips": "No name has been set",
@@ -271,10 +275,13 @@
     "SuspendBusiness": "Suspend Business",
     "successfullyAddedAlarmClock": "Successfully added alarm clock",
     "parameterAdjustment": "Parameter adjustment",
-    "generalParameterConfiguration": "General parameter configuration",
-    "advancedParameterConfiguration": "Advanced parameter configuration",
-    "debuggingParameterConfiguration": "Debugging parameter configuration",
-    "humidityParameterConfiguration": "Humidity parameter configuration",
+    "generalParameterConfiguration": "General parameters",
+    "advancedParameterConfiguration": "Advanced parameters",
+    "debuggingParameterConfiguration": "Humidity interval parameters",
+    "humidityParameterConfiguration": "Steam humidification parameters",
+    "increaseOrDecrease": "Increase or decrease",
+    "winterParameters": "Winter parameters",
+    "summerParameters": "Summer parameters",
     "tips":"Remind",
     "content": "Do you want to switch?",
     "isUpdate": "Whether to update ",
@@ -282,6 +289,8 @@
     "attention": "(Note: the number of bits is incorrect, updating may cause machine anomalies)",
     "submitUpdates": "Submit Updates",
     "modificationSucceeded": "Modification succeeded",
+    "existsFailed": "The machine name already exists",
+    "editFailed": "Modification failure",
     "noParameterData": "No parameter data is available !",
     "addDistributor": "Add Distributor",
     "equipmentNoLabel": "Equipment No",
@@ -342,8 +351,8 @@
     "restartSucceeded": "Restart succeeded",
     "deleteDeviceSucceed": "Delete Machine successfully",
     "deleteDeviceFailed": "Delete Machine failed",
-    "enableMaterialSucceed": "Enable material successfully",
-    "enableMaterialFailed": "Enable material failed",
+    "enableMaterialSucceed": "Sent successfully",
+    "enableMaterialFailed": "Sent failed",
     "sleepSuccessfully": "Sleep successfully",
     "Succeed": "Request sent successfully",
     "Failed": "Request sent failure",
@@ -672,10 +681,13 @@
     "orderAnalysis": "orderAnalysis",
     "shandeSubLedger": "shandeSubLedger",
     "taskMessage": "taskMessage",
-    "labelMan": "Label management",
+    "labelMan": "Group management",
     "apkMan": "apk management",
     "customLogo": "custom logo",
     "logMan": "Log Management",
+    "alarmTitle": "Machine alarm !",
+    "alarmDevice": "Machine: ",
+    "alarmContent": " , Alarm content: ",
     "notificationPop": {
       "notification": "Notification",
       "nextTime": "See it next time",
@@ -986,7 +998,7 @@
     "orderData": "Order Data",
     "orderRefund": "Order refund",
     "systemOffline": "System offline",
-    "labelMan": "Label management",
+    "labelMan": "Group management",
     "relationAdmin": "Associate superior",
     "apkMan": "Apk management",
     "merchantMan": "Merchant management",
@@ -1289,6 +1301,7 @@
     "twoTypedDiff": "The two passwords are different"
   },
   "robotRanking": {
+    "noPermission": "insufficient permissions",
     "machineSalesRanking": "Machine sales ranking",
     "dailySalesRanking": "Daily sales",
     "today": "Today",
@@ -1341,6 +1354,7 @@
     "withdrawalAccountNo": "Withdrawal account No",
     "standbyWithdrawalAccountNo": "Standby withdrawal account No",
     "changePassword": "Change Password",
+    "feedback": "Feedback",
     "selfRecharging": "Self recharging",
     "logOut": "Sign out",
     "logOutTips": "tips",
@@ -1366,22 +1380,25 @@
     "bindSuccess": "Bind Success"
   },
   "labelMan": {
-    "title": "Label management",
+    "title": "Group management",
     "merchant": "Merchant",
     "machine": "machine",
     "labelName": "Tagname",
     "add": {
-      "name": "Label Name",
-      "namePlace": "Please enter the label name",
+      "name": "Group Name",
+      "namePlace": "Please enter the Group name",
       "type": "type",
       "typePlace": "Please select a type",
       "merchant": "Merchant List",
       "merchantPlace": "Please select the merchant list",
       "machine": "Machine list",
-      "machinePlace": "Please select the machine list"
+      "machinePlace": "Please select the machine list",
+      "addSuccess": "Add successfully",
+      "editSuccess": "Modified successfully"
     }
   },
   "kSelectPop": {
+    "searchKey": "Please enter your search term",
     "cancel": "cancel",
     "confirm": "confirm",
     "allCheck": "Select All",
@@ -1449,7 +1466,7 @@
     "withdrawalAccountNo": "Standby withdrawal account No",
     "standbyWithdrawalAccountNo": "Standby withdrawal account No",
     "merchantManagement": "Merchant management",
-    "labelMan": "Label management"
+    "labelMan": "Group management"
   },
   "DIYFlower": {
     "openStatus": "DIY pattern function switch status: On",

Diff do ficheiro suprimidas por serem muito extensas
+ 1524 - 0
src/assets/language/ja.json


+ 36 - 19
src/assets/language/zh.json

@@ -146,6 +146,7 @@
     "confirmDel": "确认删除",
     "delPopContent": "确认进行删除操作吗?",
     "delTips": "请先选择需要删除的数据",
+    "delSuccess": "删除成功",
     "advertRule": {
       "sysTitle": "广告规则",
       "total": "共 ",
@@ -236,6 +237,9 @@
   },
   "device": {
     "managementCenter": "设备管理中心",
+    "whole": "全部",
+    "group": "分组管理",
+    "addGroup": "添加分组",
     "setAlarm": "设置闹钟",
     "equipmentName": "设备名称",
     "lockCondition": "锁机状态",
@@ -271,10 +275,13 @@
     "endSleep": "结束休眠",
     "successfullyAddedAlarmClock": "新增闹钟成功",
     "parameterAdjustment": "参数调整",
-    "generalParameterConfiguration": "通用参数配置",
-    "advancedParameterConfiguration": "进阶参数配置",
-    "debuggingParameterConfiguration": "调试参数配置",
-    "humidityParameterConfiguration": "湿度参数配置",
+    "generalParameterConfiguration": "通用参数",
+    "advancedParameterConfiguration": "进阶参数",
+    "debuggingParameterConfiguration": "湿度区间参数",
+    "humidityParameterConfiguration": "蒸气加湿参数",
+    "increaseOrDecrease": "一键递增递减",
+    "winterParameters": "冬季参数",
+    "summerParameters": "夏季参数",
     "tips":"提醒",
     "content": "是否切换开关?",
     "isUpdate": "是否更新",
@@ -282,6 +289,8 @@
     "attention": "(注意:位数不正确,更新可能会造成机器异常)",
     "submitUpdates": "提交更新",
     "modificationSucceeded": "修改成功",
+    "existsFailed": "设备名称已存在",
+    "editFailed": "修改失败",
     "noParameterData": "暂无参数数据",
     "addDistributor": "添加分销人",
     "equipmentNoLabel": "设备编号",
@@ -342,8 +351,8 @@
     "restartSucceeded": "重启成功",
     "deleteDeviceSucceed": "删除设备成功",
     "deleteDeviceFailed": "删除设备失败",
-    "enableMaterialSucceed": "启用物料监控成功",
-    "enableMaterialFailed": "启用物料监控失败",
+    "enableMaterialSucceed": "发送成功",
+    "enableMaterialFailed": "发送失败",
     "Succeed": "请求发送成功",
     "Failed": "请求发送失败",
     "sleepSuccessfully": "睡眠成功",
@@ -389,7 +398,7 @@
     "affiliatedArea": "设属地区",
     "machineType": "机器类型",
     "expirationTime": "到期时间",
-    "equipmentLabel": "设备标签",
+    "equipmentLabel": "设备分组标签",
     "edit": "编辑",
     "nameOfOperatorLabel": "运营者名称",
     "nameOfOperatorPlaceholder": "请输入运营者名称",
@@ -472,10 +481,10 @@
     "orderNumber": "订单号",
     "price": "价格",
     "tagSet": {
-      "title": "编辑标签",
-      "addTag": "添加标签",
-      "tag": "标签",
-      "allTags": "所有标签",
+      "title": "编辑分组标签",
+      "addTag": "添加分组标签",
+      "tag": "分组标签",
+      "allTags": "所有分组标签",
       "sumbmit": "提交",
       "cancel": "取消",
       "confirm": "确定"
@@ -675,10 +684,13 @@
     "orderAnalysis": "订单分析",
     "shandeSubLedger": "杉德分账",
     "taskMessage": "任务消息",
-    "labelMan": "标签管理",
+    "labelMan": "分组管理",
     "apkMan": "apk管理",
     "customLogo": "定制logo",
     "logMan": "日志管理",
+    "alarmTitle": "以下机器出现报警,请及时处理!",
+    "alarmDevice": "设备:",
+    "alarmContent": " , 报警内容:",
     "notificationPop": {
       "notification": "通知",
       "nextTime": "下次再看",
@@ -995,7 +1007,7 @@
     "orderData": "订单数据",
     "orderRefund": "订单退款",
     "systemOffline": "系统脱机",
-    "labelMan": "标签管理",
+    "labelMan": "分组管理",
     "relationAdmin": "关联上级",
     "apkMan": "apk管理",
     "merchantMan": "商户管理",
@@ -1307,6 +1319,7 @@
     "twoTypedDiff": "两次输入的密码不一致"
   },
   "robotRanking": {
+    "noPermission": "权限不足",
     "machineSalesRanking": "机器销售排行榜",
     "dailySalesRanking": "日销售排行",
     "today": "今日",
@@ -1359,6 +1372,7 @@
     "withdrawalAccountNo": "提现账号",
     "standbyWithdrawalAccountNo": "备用提现账号",
     "changePassword": "修改密码",
+    "feedback": "意见反馈",
     "selfRecharging": "自充值",
     "logOut": "退出登录",
     "logOutTips": "提示",
@@ -1384,22 +1398,25 @@
     "bindSuccess": "绑定成功"
   },
   "labelMan": {
-    "title": "标签管理",
+    "title": "分组管理",
     "merchant": "商户",
     "machine": "机器",
-    "labelName": "标签名",
+    "labelName": "分组标签名",
     "add": {
-      "name": "标签名称",
-      "namePlace": "请输入标签名称",
+      "name": "分组名称",
+      "namePlace": "请输入分组名称",
       "type": "类型",
       "typePlace": "请选择类型",
       "merchant": "商家列表",
       "merchantPlace": "请选择商家列表",
       "machine": "机器列表",
-      "machinePlace": "请选择机器列表"
+      "machinePlace": "请选择机器列表",
+      "addSuccess": "添加成功",
+      "editSuccess": "修改成功"
     }
   },
   "kSelectPop": {
+    "searchKey": "请输入搜索关键词",
     "cancel": "取消",
     "confirm": "确定",
     "allCheck": "全选",
@@ -1467,7 +1484,7 @@
     "withdrawalAccountNo": "提现账号",
     "standbyWithdrawalAccountNo": "备用提现账号",
     "merchantManagement": "商户管理",
-    "labelMan": "标签管理"
+    "labelMan": "分组管理"
   },
   "DIYFlower": {
     "openStatus": "DIY花型功能开关状态:开启",

BIN
src/assets/order/spunSugar/goods/A49.png


BIN
src/assets/order/spunSugar/goods/A50.png


BIN
src/assets/order/spunSugar/goods/A67.png


BIN
src/assets/order/spunSugar/goods/A68.png


BIN
src/assets/order/spunSugar/goods/A69.png


BIN
src/assets/order/spunSugar/goods/A70.png


BIN
src/assets/user/feedback.png


+ 8 - 2
src/common/js/utils.js

@@ -22,7 +22,7 @@ export const $M_Menus = {
   // "M8":t("role.accountPermission"),//账号权限
   "M9":t("role.orderExport"),//订单导出
   // "M10":t("role.shandeSubLedger"),//杉德分账
-  // "M11":t("role.salesRanking"),//销售排行
+  "M11":t("role.salesRanking"),//销售排行
   // "M12":t("role.withdrawalAccountNo"),//提现账号
   // "M13":t("role.standbyWithdrawalAccountNo"),//备用提现账号
   "M14":t("role.dataOverview"),//数据概览
@@ -4461,5 +4461,11 @@ export const prefix = (url) => {
 // 获取当前语言
 export function navigatorLanguage() {
   const navigatorLanguage = (navigator.language || navigator.browserLanguage).toLowerCase()
-  return navigatorLanguage.substring(0, 2) == 'zh' ? 'zh' : 'en';
+  const lan = navigatorLanguage.substring(0, 2);
+  console.log("当前语言", lan);
+  if (lan != 'en') {
+    // 如果不为英文
+    return lan;
+  }
+  return 'en';
 }

+ 39 - 4
src/components/commom/kSelectPop/index.vue

@@ -7,6 +7,8 @@
           <div class="c-text-16 c-text-b">{{ $t('kSelectPop.selectTitle') }}</div>
           <div @click="confirmClk" class="c-text-16 c-text-color">{{ $t('kSelectPop.confirm') }}</div>
         </div>
+        <van-search v-model="searchValue" :placeholder="$t('kSelectPop.searchKey')" shape="round" background="#2c87c8"
+          @update:model-value="valueChange" />
         <div style="height: 50vh;overflow:hidden;overflow-y:auto;">
           <!-- 全选 -->
           <van-checkbox-group v-model="allChecked" ref="allCheckRef">
@@ -24,7 +26,7 @@
                 <div v-for="(item, index) in props.selOptions" :key="index" class="kBordBott">
                   <van-cell :border="false" :title="item[selTitleAndName[0]]" @click="toggle(index)">
                     <template #right-icon>
-                      <van-checkbox @click.stop="toggle(index)" :name="item[selTitleAndName[1]]"
+                      <van-checkbox @click.stop="toggle(index)" :name="item[selTitleAndName[0]]"
                         :ref="(el) => (checkboxRefs[index] = el)" />
                     </template>
                   </van-cell>
@@ -63,8 +65,39 @@ export default {
   setup(props, { emit }) {
     // 点击确定按钮
     const confirmClk = () => {
-      emit("selconfirm", checked.value);
+      // console.log("选中", checked.value);
+      let checkedOptions = [];
+      props.selOptions.forEach((item) => {
+        if (checked.value.includes(item.name) || (item.username != null && checked.value.includes(item.username)) || (item.clientId != null && checked.value.includes(item.clientId))) {
+          checkedOptions.push(item.id);
+        }
+      })
+      // console.log("checkedOptions", checkedOptions);
+      emit("selconfirm", checked.value, checkedOptions);
     };
+    // 搜索关键词
+    const searchValue = ref('');
+    const tempOptions = ref([]);
+    const valueChange = () => {
+      if (tempOptions.value.length == 0) {
+        tempOptions.value = props.selOptions;
+      }
+      // console.log("关键词", searchValue.value);
+      // console.log("原始数据", tempOptions.value);
+      let newOptions = [];
+      tempOptions.value.forEach((item) => {
+        if (item.name.includes(searchValue.value) || (item.username != null && item.username.includes(searchValue.value)) || (item.clientId != null && item.clientId.includes(searchValue.value))) {
+          newOptions.push(item);
+        }
+      })
+      emit("searchData", newOptions);
+      if (checked.value.length === tempOptions.value.length) {
+        allCheckRef.value.toggleAll(true);
+        checkboxGroup.value.toggleAll(true);
+      } else {
+        allCheckRef.value.toggleAll(false);
+      }
+    }
     // 全选
     const allCheckRef = ref(null);
     const allChecked = ref([]);
@@ -86,7 +119,7 @@ export default {
       if (selectedOpt) {
         // 找到选中的值在所有值里面的下标,做切换状态
         if (props.selOptions.length > 0) {
-          console.log('selectedOpt',selectedOpt)
+          console.log('selectedOpt', selectedOpt)
           checked.value = selectedOpt;
         }
       } else {
@@ -108,7 +141,7 @@ export default {
       // 单个选中状态切换
       checkboxRefs.value[index].toggle();
       // 如果选中的长度和选项的长度相等,那么全选要选中状态
-      if (checked.value.length === props.selOptions.length) {
+      if (checked.value.length === tempOptions.value.length) {
         allCheckRef.value.toggleAll(true);
       } else {
         allCheckRef.value.toggleAll(false);
@@ -131,6 +164,8 @@ export default {
       allCheckRef,
       confirmClk,
       selPopClose,
+      searchValue,
+      valueChange
     };
   },
 };

+ 2 - 1
src/main.js

@@ -4,7 +4,7 @@ import {
   AddressList, Field, CellGroup, Cell, SwipeCell, Icon, Stepper, Card, Checkbox, CheckboxGroup, Button, Swipe, SwipeItem,
   PullRefresh, List, Tab, Tabs, SubmitBar, Toast, Skeleton, RadioGroup, Radio, NoticeBar, ActionSheet, Cascader, Col, Row,
   Slider, DatePicker, Switch, Calendar, Picker, Uploader, Tag, DropdownMenu, DropdownItem, Notify, ConfigProvider, NavBar,
-  Area, Popover, Collapse, CollapseItem, PickerGroup, TimePicker, BackTop, Progress, Tabbar, TabbarItem
+  Area, Popover, Collapse, CollapseItem, PickerGroup, TimePicker, BackTop, Progress, Tabbar, TabbarItem, Search
 } from 'vant';
 import { Image as VanImage } from 'vant';
 import App from './App.vue'
@@ -90,6 +90,7 @@ app.use(ActionBarButton)
   .use(Progress)
   .use(Tabbar)
   .use(TabbarItem)
+  .use(Search)
 
 
 app.use(router)

+ 7 - 0
src/router/index.js

@@ -56,6 +56,13 @@ const router = createRouter({
       component: () => import("@/views/changePassword"),
       meta: { index: 1, noLogin: true },
     },
+    // 意见反馈
+    {
+      path: "/feedback",
+      name: "feedback",
+      component: () => import("@/views/feedback"),
+      meta: { index: 1 },
+    },
     // 设备页面
     {
       path: "/device",

+ 10 - 0
src/service/device/index.js

@@ -17,6 +17,11 @@ export function updateDevice(params) {
     return axios.post(`/SZWL-SERVER/tEquipment/update?${stringToUrl(params)}`, params);
 }
 
+// 获取花型种类下拉列表
+export function getGoodsNumber(params) {
+    return axios.get(`/SZWL-SERVER/tGoodsData/getGoodsNumber?${stringToUrl(params)}`);
+}
+
 // 消除报警
 export function eliminate(params) {
     return axios.post(`/SZWL-SERVER/tEquipment/eliminate?${stringToUrl(params)}`, params);
@@ -117,6 +122,11 @@ export function updateParameters(params) {
     return axios.post(`/SZWL-SERVER/tParameters/updateParameters`, params)
 }
 
+// 修改湿度区间参数
+export function humidityParameters(params) {
+    return axios.post(`/SZWL-SERVER/tEquipment/humidityParameters`, params)
+}
+
 // 启用物料监控
 export function enableMaterial(params) {
     return axios.post(`/SZWL-SERVER/tParameters/enableMaterial`, params)

+ 9 - 9
src/service/labelMan/index.js

@@ -1,35 +1,35 @@
-import axios from '../../utils/axios';
+import axios from "../../utils/axios";
 
 // 获取标签列表
 export function Api_getLabelList(params) {
-  return axios.get('/SZWL-SERVER/tLabel/list',{params});
+  return axios.get("/SZWL-SERVER/tLabel/list", { params });
 }
 // 获取商家列表
 export function Api_getListAdmin(params) {
-  return axios.get('/SZWL-SERVER/tAdmin/listAdmin',{params});
+  return axios.get("/SZWL-SERVER/tAdmin/listAdmin", { params });
 }
 // 获取机器列表
 export function Api_getListEquipment(params) {
-  return axios.get('/SZWL-SERVER/tEquipment/listEquipment',{params});
+  return axios.get("/SZWL-SERVER/tEquipment/listEquipment", { params });
 }
 
 // 添加
 export function Api_postAddLabel(params) {
-  return axios.post('/SZWL-SERVER/tLabel/add',params);
+  return axios.post("/SZWL-SERVER/tLabel/add", params);
 }
 // 修改
 export function Api_postUpdateLabel(params) {
-  return axios.post('/SZWL-SERVER/tLabel/update',params);
+  return axios.post("/SZWL-SERVER/tLabel/update", params);
 }
 // 删除
 export function Api_getDelLabel(params) {
-  return axios.get('/SZWL-SERVER/tLabel/delete',{params});
+  return axios.get("/SZWL-SERVER/tLabel/delete", { params });
 }
 // 单个机器添加标签
 export function Api_getEquipmentToLabel(params) {
-  return axios.get('/SZWL-SERVER/tLabel/equipmentToLabel',{params});
+  return axios.get("/SZWL-SERVER/tLabel/equipmentToLabel", { params });
 }
 // 查询机器的标签列表
 export function Api_getGetEquipmentToLabel(params) {
-  return axios.get('/SZWL-SERVER/tLabel/getEquipmentToLabel',{params});
+  return axios.get("/SZWL-SERVER/tLabel/getEquipmentToLabel", { params });
 }

+ 5 - 0
src/styles/device/index.less

@@ -609,4 +609,9 @@
 .van-checkbox__icon--checked .van-icon {
   background-color: #2c87c8;
   border-color: #2c87c8;
+}
+
+:root {
+  --van-width: auto;
+  --van-popover-action-width: var(--van-width);
 }

+ 3 - 3
src/styles/home/index.less

@@ -67,12 +67,12 @@
 
     .titleBox {
       width: 100%;
-      height: 16px;
-      margin: 23px 0;
+      height: 30px;
+      margin: 12px 0;
 
       .layer2 {
         width: 100%;
-        height: 16px;
+        height: 25px;
 
         .section5 {
           width: 15px;

+ 6 - 0
src/styles/labelMan/index.less

@@ -10,6 +10,12 @@
         }
     }
 
+    .intervalRow {
+        padding: 0 10px;
+        height: 1.5px;
+        background-color: #f5f5f5;
+      }
+
     .van-tabs__line {
         background-color: #2c87c8 !important;
     }

+ 8 - 3
src/styles/login/index.less

@@ -22,10 +22,11 @@
     }
 
     .languageCon {
-      right: 10px;
+      width: 60px;
+      right: 15px;
       top: 10px;
       border: 1px solid #2c87c8;
-      padding: 5px 10px;
+      padding: 2px 3px;
       border-radius: 10px;
       color: #2c87c8;
     }
@@ -54,7 +55,7 @@
     margin-top: 20px;
 
     .van-field__body {
-      height: 100%;
+      height: 38px;
     }
 
     .van-form .van-cell {
@@ -174,4 +175,8 @@
 
   }
 
+}
+:root {
+  --van-width: auto;
+  --van-popover-action-width: var(--van-width);
 }

+ 13 - 0
src/styles/paramsSet/index.less

@@ -146,5 +146,18 @@
                 border-radius: 50px;
             }
         }
+        .inputButton {
+            .van-field__label {
+                align-items: center;
+            }
+
+            .updataButton {
+                background-color: transparent;
+                color: #2c87c8;
+                border-color: #2c87c8;
+                padding: 0 0.5em;
+                border-radius: 50px;
+            }
+        }
     }
 }

+ 11 - 0
src/styles/user/index.less

@@ -219,6 +219,17 @@
                         top: 0.4rem;
                     }
 
+                    &.feedbackIcon::after {
+                        content: "";
+                        position: absolute;
+                        background: #fff url("../../assets/user/feedback.png") top center no-repeat;
+                        background-size: 100%;
+                        width: 0.6rem;
+                        height: 0.6rem;
+                        right: 0.2rem;
+                        top: 0.4rem;
+                    }
+
                     &.loginOutIcon::after {
                         content: "";
                         position: absolute;

+ 30 - 26
src/utils/i18n.js

@@ -1,37 +1,41 @@
-import { createI18n } from 'vue-i18n';
-import { navigatorLanguage } from '../common/js/utils';
+import { createI18n } from "vue-i18n";
+import { navigatorLanguage } from "../common/js/utils";
 // 引入英文语言包
-import enUS from 'vant/es/locale/lang/en-US';
+import enUS from "vant/es/locale/lang/en-US";
 // 引入简体中文语言包
-import zhCN from 'vant/es/locale/lang/zh-CN';
-let language = 'en';
+import zhCN from "vant/es/locale/lang/zh-CN";
+import jaJP from "vant/es/locale/lang/ja-JP";
+let language = "en";
 // 储存语言,方便中英切换
-const curLang = localStorage.getItem('curLang');
+const curLang = localStorage.getItem("curLang");
 if (curLang) {
-    language = curLang;
-    localStorage.setItem('curLang', curLang);
+  language = curLang;
+  localStorage.setItem("curLang", curLang);
 } else {
-    language = navigatorLanguage();
-    localStorage.setItem('curLang', navigatorLanguage());
+  language = navigatorLanguage();
+  localStorage.setItem("curLang", navigatorLanguage());
 }
 // vant组件的中英文切换
-import { Locale } from 'vant';
+import { Locale } from "vant";
 // 判断中英文,切换vant语言包
-if (language === 'en') {
-    Locale.use('en-US', enUS);
+if (language === "en") {
+  Locale.use("en-US", enUS);
+} else if (language === "ja") {
+  Locale.use("ja-JP", jaJP);
 } else {
-    Locale.use('zh-CN', zhCN);
+  Locale.use("zh-CN", zhCN);
 }
 export default createI18n({
-    //多语言实例
-    legacy: false,
-    globalInjection: true,
-    // 默认语言
-    locale: localStorage.getItem('curLang'),
-    // 关闭控制台警告
-    silentFallbackWarn: true,
-    messages: {
-        'en': require('../assets/language/en.json'), //英文包
-        'zh': require('../assets/language/zh.json'), //中文包
-    }
-});
+  //多语言实例
+  legacy: false,
+  globalInjection: true,
+  // 默认语言
+  locale: localStorage.getItem("curLang"),
+  // 关闭控制台警告
+  silentFallbackWarn: true,
+  messages: {
+    'en': require('../assets/language/en.json'), //英文包
+    'zh': require('../assets/language/zh.json'), //中文包
+    'ja': require('../assets/language/ja.json'), //日文包
+  },
+});

+ 0 - 6
src/views/accountOperation/index.vue

@@ -33,12 +33,6 @@
           <div class="taskTitle">{{ $t('accountOperation.merchantManagement') }}</div>
         </div>
       </div>
-      <div class="taskListRow flex-col" @click="pushPageList('/labelMan')">
-        <div class="taskIcon labelIcon"></div>
-        <div class="taskRight">
-          <div class="taskTitle">{{ $t('accountOperation.labelMan') }}</div>
-        </div>
-      </div>
     </div>
   </div>
 </template>

+ 17 - 17
src/views/accountPer/add.vue

@@ -63,7 +63,7 @@
         @close="roleShow = false" @finish="onRoleFinish" />
     </van-popup>
     <!-- 机器弹窗 -->
-    <kSelectPop @selconfirm="selEquipConfirm" ref="kSelectPopEquipRef" :selOptions="selEquipOptions"
+    <kSelectPop @selconfirm="selEquipConfirm" ref="kSelectPopEquipRef" :selOptions="selEquipOptions" @searchData="searchEquData"
       :selTitleAndName="['name', 'id']"></kSelectPop>
   </div>
 </template>
@@ -117,7 +117,7 @@ export default {
       isEnabled: true,
       roleList: "",
       equipmentIds: "",
-      companyType: "0",
+      companyType: "1",
     });
     const cofficentForm = ref({
       equipmentNames: "",
@@ -164,6 +164,10 @@ export default {
         showFailToast(data.message);
       }
     };
+    const searchEquData = (e) => {
+      // console.log("设备列表", e);
+      selEquipOptions.value = e;
+    }
     // 获取机器下拉
     const getEquipmentListFun = async () => {
       const { data } = await getEquipmentList({ adminId: user.id });
@@ -243,8 +247,8 @@ export default {
     };
     // 点击机器列表
     const busiEquipInpClk = () => {
-      if (addParams.equipmentIds) {
-        let list = addParams.equipmentIds.split(",");
+      if (cofficentForm.value.equipmentNames) {
+        let list = cofficentForm.value.equipmentNames.split(",");
         console.log(list, "list");
         kSelectPopEquipRef.value.selPopOpen(list);
       } else {
@@ -255,19 +259,14 @@ export default {
     const selEquipOptions = ref([]);
     const kSelectPopEquipRef = ref(null);
     // 机器弹窗的确定按钮
-    const selEquipConfirm = (e) => {
+    const selEquipConfirm = (e, e1) => {
+      console.log("e", e);
+      console.log("e1", e1);
       if (e.length > 0) {
-        const list = [];
-        // 根据id找到对应的name
-        selEquipOptions.value.forEach(item => {
-          e.forEach(item1 => {
-            if (item.id === item1) {
-              list.push(item.name);
-            }
-          })
-        })
-        cofficentForm.value.equipmentNames = list.join(",");
-        addParams.equipmentIds = e.join(",");
+        cofficentForm.value.equipmentNames = e.join(",");
+        addParams.equipmentIds = e1.join(",");
+        console.log("equipmentNames", cofficentForm.value.equipmentNames);
+        console.log("equipmentIds", addParams.equipmentIds);
       } else {
         cofficentForm.value.equipmentNames = "";
         addParams.equipmentIds = '';
@@ -294,7 +293,8 @@ export default {
       busiEquipInpClk,
       havePassword,
       passwordPlaceholder,
-      isUserName
+      isUserName,
+      searchEquData,
     };
   },
 };

+ 38 - 7
src/views/device/deviceOper.vue

@@ -120,9 +120,12 @@
       <!-- 物料监控 -->
       <div class="operItem" @click="materialMonitorClk()" v-if="device.equimentType != 'SI320'">
         <div class="operIcon">
-          <img class="operImg" src="../../assets/device/operIcon/materialMonitor.png" />
+          <img v-if="materialIcon === '0'" class="operImg" src="../../assets/device/operIcon/materialMonitor.png" />
+          <img v-else class="operImg" src="../../assets/device/operIcon/materialMonitorOff.png" />
+          <!-- <img class="operImg" src="../../assets/device/operIcon/materialMonitor.png" /> -->
         </div>
-        <div class="operText">{{ $t("device.materialMonitor") }}</div>
+        <!-- <div class="operText">{{ $t("device.materialMonitor") }}</div> -->
+        <div class="operText">{{ materialTitle }}</div>
       </div>
       <!-- 屏蔽/展示商品 -->
       <div class="operItem" @click="showGoodsClk()" v-if="device.equimentType != 'SI320'">
@@ -244,8 +247,14 @@ export default {
     const operCheckShow = ref(false);
     const device = ref({});
     const operType = ref("");
-    // 休眠按钮
+    // 睡眠按钮文字
     const sleepTitle = ref(t("device.turnOnSleep"));
+    // 物料监控按钮文字
+    const materialTitle = ref(t("device.materialMonitorOn"));
+    // 睡眠图标
+    const sleepIcon = ref('0');
+    // 物料监控图标
+    const materialIcon = ref('0');
     // 初始化页面获取列表
     onMounted(async () => {
       // 加载样式
@@ -261,6 +270,15 @@ export default {
       } else {
         sleepTitle.value = t("device.turnOnSleep");
       }
+      // 物料监控
+      // isMaterialUse = "1"时,物料监控已开启
+      if (device.value.isMaterialUse === '1') {
+        materialTitle.value = t("device.materialMonitorOn");
+        materialIcon.value = '0';
+      } else {
+        materialTitle.value = t("device.materialMonitorOff");
+        materialIcon.value = '1';
+      }
     };
     const closeOper = () => {
       show.value = false;
@@ -331,7 +349,7 @@ export default {
         query: { deviceId: device.value.id, clientId: device.value.clientId },
       });
     };
-    // 系统脱机
+    // 系统脱机
     const tuojiEquipmentFun = () => {
       operType.value = 5;
       operCheckShow.value = true;
@@ -430,7 +448,7 @@ export default {
           showFailToast(data.message);
         }
       }
-      // 删除设备
+      // 删除设备
       if (operType.value === 6) {
         const { data } = await delOneDevice({
           equipmentId: device.value.id,
@@ -445,8 +463,15 @@ export default {
       }
       // 启用物料监控
       if (operType.value === 7) {
+        
+        let materialMonitorStatus = 0; // 0默认是未开启
+        // isMaterialUse是1时,物料监控已启用,按钮是关闭功能
+        if (device.value.isMaterialUse === "1") {
+          materialMonitorStatus = 1; // 1代表已开启
+        }
         const { data } = await enableMaterial({
           equipmentId: device.value.id,
+          materialMonitorStatus
         });
         if (data.code === '00000') {
           showSuccessToast(t("device.enableMaterialSucceed"));
@@ -492,13 +517,19 @@ export default {
       showGoodsClk,
       diyFlowerClk,
       sleepTitle,
+      materialTitle,
       viewLogs,
       deleteDevice,
+      // viewPosiClk,
       changePasswordClk,
-      materialMonitorClk
+      sleepIcon,
+      materialIcon,
+      materialMonitorClk,
     };
   },
   components: {},
 };
 </script>
-<style lang="less" scoped>@import "../../common/style/common";</style>
+<style lang="less" scoped>
+@import "../../common/style/common";
+</style>

+ 38 - 1
src/views/device/deviceSearch.vue

@@ -4,12 +4,16 @@
     <van-action-sheet v-model:show="sheetShow" :closeable='false' :title="$t('device.enterAnyInformationToSearch')">
       <div class="content">
         <van-form @submit="onSubmit">
+          <!-- 设备编号 -->
           <van-field v-model="clientId" name="clientId" :label="$t('device.equipmentNoLabel')"
             :placeholder="$t('device.equipmentNoPlaceholder')" />
+          <!-- 设备名称 -->
           <van-field v-model="equipmentName" name="equipmentName" :label="$t('device.equipmentNameLabel')"
             :placeholder="$t('device.equipmentNamePlaceholder')" />
+          <!-- 商家名 -->
           <van-field v-model="adminName" name="adminName" :label="$t('device.merchantNameLabel')"
             :placeholder="$t('device.merchantNamePlaceholder')" />
+          <!-- 公司平台 -->
           <div v-if="isShowCompany()">
             <van-field label-width="86" v-model="companyTypeText" is-link readonly :label="$t('device.companyTypeLabel')"
               :placeholder="$t('device.companyTypePlaceholder')" @click="companyTypeShow = true" class="field" />
@@ -121,9 +125,11 @@
 </template>
 
 <script>
-import { ref } from 'vue';
+import { ref, onMounted } from 'vue';
 import { useI18n } from 'vue-i18n';
 import { getLoginUser, styleUrl } from "../../common/js/utils";
+import { Api_getLabelList } from "../../service/labelMan";
+
 
 export default {
   setup(prop, context) {
@@ -137,8 +143,11 @@ export default {
     const machineTypeText = ref(''); // 设备类型 - 页面显示
     const machineTypeShow = ref(false); // 设备类型级联状态
     const companyType = ref(''); // 公司平台
+    const deviceGroup = ref(''); // 设备分组
     const companyTypeText = ref(''); // 公司平台 - 页面显示
+    const deviceGroupText = ref(''); // 设备分组 - 页面显示
     const companyTypeShow = ref(false); // 公司平台级联状态
+    const deviceGroupShow = ref(false); // 设备分组级联状态
     const user = getLoginUser(); // 获取登录用户
     const machineTypeOptions = ref([
       {
@@ -164,10 +173,12 @@ export default {
         value: '1',
       }
     ]);
+    const deviceGroupOptions = ref([]);
     const machineTypeFinish = ({ selectedOptions }) => {
       machineTypeShow.value = false;
       machineTypeText.value = selectedOptions.map((option) => option.text).join('/');
     }; // 设备类型级联选择
+
     const companyTypeFinish = ({ selectedOptions }) => {
       companyTypeShow.value = false;
       companyTypeText.value = selectedOptions.map((option) => option.text).join('/');
@@ -310,6 +321,8 @@ export default {
       machineTypeText.value = '';
       companyType.value = '';
       companyTypeText.value = '';
+      deviceGroup.value = '';
+      deviceGroupText.value = '';
       equimentType.value = '';
       equimentTypeText.value = '';
       eqeStatus.value = '';
@@ -322,6 +335,25 @@ export default {
       channelText.value = '';
     };
 
+    onMounted(() => {
+      // 获取标签分组
+      getLabelList();
+    });
+    // 获取设备标签
+    const getLabelList = async () => {
+      // console.log("adminId>>>>", user.id);
+      Api_getLabelList({
+        adminId: user.id,
+        type: "1"
+      }).then((res) => {
+        const { data } = res.data;
+        deviceGroupOptions.value = data.map((label) => ({
+          text: label.name,
+          value: label.id,
+        }));
+      })
+    }
+
     // 加载样式
     styleUrl('deviceSearch');
 
@@ -355,6 +387,11 @@ export default {
       companyTypeOptions,
       companyTypeFinish,
 
+      deviceGroup,
+      deviceGroupText,
+      deviceGroupShow,
+      deviceGroupOptions,
+
       eqeStatus,
       eqeStatusText,
       eqeStatusShow,

+ 53 - 8
src/views/device/deviceSet.vue

@@ -7,8 +7,7 @@
         <div class="bd3 flex-col">
           <div class="mod1 flex-col">
             <span class="word2">{{ $t("device.essentialInformation") }}</span>
-            <img class="pic1" referrerpolicy="no-referrer"
-              src="../../assets/line.png" />
+            <img class="pic1" referrerpolicy="no-referrer" src="../../assets/line.png" />
           </div>
           <div class="mod2 flex-col"></div>
         </div>
@@ -119,14 +118,14 @@
           </template>
         </van-field> -->
         <div class="cust_vantBorder">
-          <van-field required clearable v-model="deviceDetal.operationalName" name="operationalName"
+          <van-field required clearable v-model="deviceDetal.contactName" name="contactName"
             :label="`${$t('device.nameOfOperatorLabel')}`" :placeholder="$t('device.nameOfOperatorPlaceholder')" :rules="[
               {
                 required: true,
                 message: $t('device.nameOfOperatorPlaceholder'),
               },
             ]" />
-          <van-field required clearable v-model="deviceDetal.operationalPhone" name="operationalPhone"
+          <van-field required clearable v-model="deviceDetal.contactPhone" name="contactPhone"
             :label="`${$t('device.operatorTelephoneLabel')}`" :placeholder="$t('device.operatorTelephonePlaceholder')"
             :rules="[
               {
@@ -196,7 +195,7 @@
         </template>
         <!-- 花型种类 -->
         <template v-if="isAdmind && machineType === '0'">
-          <van-field readonly :label="`${$t('device.flowerType')}`" placeholder="">
+          <!-- <van-field readonly :label="`${$t('device.flowerType')}`" placeholder="">
             <template #input>
               <div class="van-cell__value van-field__value radioBox">
                 <van-radio-group v-model="deviceDetal.flowers" direction="horizontal">
@@ -209,7 +208,9 @@
                 </van-radio-group>
               </div>
             </template>
-          </van-field>
+          </van-field> -->
+          <van-field v-model="deviceDetal.flowers" is-link readonly :label="$t('device.flowerType')" placeholder="选择花型种类"
+            @click="showFlowerPicker = true" />
         </template>
         <!-- 版本号 -->
         <van-field readonly v-model="deviceDetal.apkVersion" :label="`${$t('device.versionNo')}`" placeholder="" />
@@ -237,6 +238,11 @@
       :confirmBtnTxt="$t('user.confirmLog')" ref="kDialogRef" :dialogContent="$t('device.sureUpdate')"
       @confirmclk="confirmClk">
     </kDialog>
+    <!-- 花型种类 -->
+    <van-popup v-model:show="showFlowerPicker" round position="bottom">
+      <van-picker v-model="selectedFlower" :columns="flowerColumns" @cancel="showFlowerPicker = false"
+        @confirm="onFlowerConfirm" />
+    </van-popup>
   </div>
 </template>
 <script>
@@ -260,6 +266,7 @@ import {
   updateDevice,
   Api_getTApkInfo_updateApk,
   Api_getDiscCodeStatus,
+  getGoodsNumber,
 } from "@/service/device/index";
 import { showFailToast, showSuccessToast, showToast } from "vant";
 import { useI18n } from "vue-i18n";
@@ -296,6 +303,8 @@ export default {
     const deviceDetal = ref({
       name: "",
       selfName: "",
+      contactName: "",
+      contactPhone: "",
       operationalName: "",
       operationalPhone: "",
       timeRuleId: "",
@@ -407,6 +416,12 @@ export default {
         }
         if (data.data.machineType === '1') {
           machineType.value = '1';
+        } else if (data.data.machineType === '2') {
+          machineType.value = '1';
+        }
+        if (machineType.value == '0') {
+          selectedFlower.value = [deviceDetal.value.flowers];
+          getFlowerNumber(machineType.value);
         }
         if (data.data.equimentType === 'MG320') {
           equimentType.value = 'SC320';
@@ -452,12 +467,38 @@ export default {
       if (data.code === "00000") {
         isUpdate.value = true;
         showSuccessToast(t("device.modificationSucceeded"));
-        router.push({ path: "/device" });
+        setTimeout(() => {
+          router.push({ path: "/device" });
+        }, 1500);
+      } else if (data.code === "A0001") {
+        // 设备名称重复
+        showToast(t("device.existsFailed"));
       } else {
-        showFailToast(data.message);
+        showFailToast(t("device.editFailed"))
       }
     };
 
+    // 选中的花型种类
+    const selectedFlower = ref([]);
+    // 花型种类数据
+    const flowerColumns = [];
+    // 显示弹窗
+    const showFlowerPicker = ref(false);
+    // 获取花型种类下拉列表
+    const getFlowerNumber = async (machineType) => {
+      const { data } = await getGoodsNumber({ machineType: machineType });
+      if (data.code === "00000") {
+        data.data.forEach(item => {
+          flowerColumns.push({ text: item, value: item + "" })
+        });
+      }
+    }
+    //确认选择
+    const onFlowerConfirm = ({ selectedOptions }) => {
+      showFlowerPicker.value = false;
+      deviceDetal.value.flowers = selectedOptions[0].text;
+    }
+
     // 点击去到编辑标签页
     const toTagSet = () => {
       router.push({
@@ -559,6 +600,10 @@ export default {
       onConfirm,
       showPayment,
       equimentType,
+      flowerColumns,
+      showFlowerPicker,
+      selectedFlower,
+      onFlowerConfirm,
     };
   },
 };

+ 71 - 10
src/views/device/index.vue

@@ -15,8 +15,17 @@
               </div>
             </div>
             <div class="flex-col">
-              <div class="main5 flex-row justify-between" @click="searchClick">
-                <img class="label2" src="../../assets/device/searchIcon.png" />
+              <div class="main5 flex-row justify-between">
+                <van-popover v-model:show="showPopover" placement="left-start" theme="dark" :actions="actions"
+                  @select="selectLabel">
+                  <template #reference>
+                    <van-icon name="bars" class="fixed-icon o-pr-15" size="23" color="#2e87c8" />
+                  </template>
+                </van-popover>
+                <img class="label2" src="../../assets/device/searchIcon.png" @click="searchClick" />
+                <!-- <div class="TextGroup2 flex-col">
+                  <span class="txt3">{{ $t("device.search") }}</span>
+                </div> -->
               </div>
             </div>
           </div>
@@ -45,6 +54,12 @@
           </div>
         </div>
         <div class="deviceBox2 flex-col justify-between">
+          <van-tabs v-model:active="active" @click-tab="clickLabel" class="tabs2 o-pb-15" color="#2e87c8">
+            <van-tab :title="$t('device.whole')" name="">
+            </van-tab>
+            <van-tab v-for="item in labelList" :name="item.id" :key="item" :title="item.name">
+            </van-tab>
+          </van-tabs>
           <div class="section1 flex-col">
             <div class="outer1 flex-col o-plr-15">
               <div v-for="item in list" :key="item" class="o-pb-20">
@@ -56,11 +71,6 @@
                     </div>
                   </div>
                   <div class="l-flex-RC">
-                    <!-- 报警标志 -->
-                    <!-- <div v-if="item.hasTodayAlarm" class="box4 flex-col"> -->
-                    <!-- <img class="pic1" src="../../assets/device/alarm.png" /> -->
-                    <!-- <img class="pic1" src="../../assets/home/M15.png" /> -->
-                    <!-- </div> -->
                     <div v-if="item.hasTodayAlarm" class="l-flex-between o-pl-5">
                       <div class="box4 flex-col "></div>
                       <span class="o-pl-2" style="color: #fe5d55">{{ $t("device.alarmClock") }}</span>
@@ -213,7 +223,8 @@
                     showDateTime(item.lastUpdateTime)
                   }}</span>
                   <!-- 音量 -->
-                  <span v-if="item.machineType != '2'" class="info2 o-ptb-7 kBordBott">{{ $t("device.volume") }}:{{ item.volume }}</span>
+                  <span v-if="item.machineType != '2'" class="info2 o-ptb-7 kBordBott">{{ $t("device.volume") }}:{{
+                    item.volume }}</span>
                   <!-- 报警内容 -->
                   <div class="l-flex-RC o-ptb-7">
                     <span class="info3 kBordBott">{{ $t("device.alarmContent") }}:</span>
@@ -273,7 +284,7 @@ import {
 import { onMounted, reactive, toRefs, ref, onActivated } from "vue";
 import { showFailToast, showSuccessToast, showToast, showDialog } from "vant";
 import sHeader from "../../components/SimpleHeader";
-import { getLoginUser, Format_calcuDecial } from "../../common/js/utils";
+import { getLoginUser, Format_calcuDecial, styleUrl } from "../../common/js/utils";
 import {
   getDeviceList,
   eliminate,
@@ -286,6 +297,7 @@ import { onBeforeRouteLeave, useRouter } from "vue-router";
 import dateUtil from "../../utils/dateUtil";
 import { useI18n } from "vue-i18n";
 import { onBeforeUnmount } from "vue";
+import { Api_getLabelList } from "../../service/labelMan";
 
 export default {
   name: "device",
@@ -302,6 +314,7 @@ export default {
     const sys = ref(null);
     const user = getLoginUser();
     const verticalScrollPosition = ref(0);
+    const labelList = ref([]);
 
     // 返回顶部
     const backTop = () => {
@@ -349,6 +362,7 @@ export default {
       current: 1, // 页数
       size: 10, // 页大小
       todayDate: dateUtil.formateDate(new Date(), "yyyy-MM-dd"), // 当天时间
+      labelId: "", // 分组标签
     });
     // 初始化页面获取列表
     onMounted(() => {
@@ -357,12 +371,13 @@ export default {
       updateDataInterval();
       // window.addEventListener('scroll', handleScroll);
       // 加载样式
-      // styleUrl('device');
+      styleUrl('device');
     });
     // 初始化
     const init = () => {
       // 获取设备情况
       getMachineNum();
+      getLabelList();
       if (localStorage.getItem("loginSys")) {
         const loginSysString = localStorage.getItem("loginSys");
         sys.value = JSON.parse(loginSysString);
@@ -378,6 +393,18 @@ export default {
       }
     };
 
+    // 获取设备标签
+    const getLabelList = async () => {
+      // console.log("adminId>>>>", user.id);
+      Api_getLabelList({
+        adminId: user.id,
+        type: "1"
+      }).then((res) => {
+        const { data } = res.data;
+        labelList.value = data;
+      })
+    }
+
     // 获取设备列表数据
     const getList = async () => {
       finished.value = false;
@@ -547,6 +574,33 @@ export default {
         }
       }
     }
+
+    
+    // 点击标签
+    const active = ref("");
+    const clickLabel = (item) => {
+      console.log(item);
+      list.value = [];
+      searchParams.current = 1;
+      searchParams.labelId = item.name;
+      getList();
+    }
+    // 分组管理
+    const showPopover = ref(false);
+    const actions = [
+      { text: t("device.group"), value: '0' },
+      { text: t("device.addGroup"), value: '1' },
+    ];
+    const selectLabel = (action) =>  {
+      // showToast(action.value);
+      if (action.value == '0') {
+        router.push('/labelMan');
+      }
+      if (action.value == '1') {
+        router.push("/labelManAdd");
+      }
+    }
+
     return {
       ...toRefs(searchParams),
       list,
@@ -573,6 +627,13 @@ export default {
       sleepDescBoxShow,
       sleepDescChg,
       backTop,
+      user,
+      labelList,
+      clickLabel,
+      active,
+      actions,
+      showPopover,
+      selectLabel
     };
   },
 };

+ 73 - 9
src/views/device/paramsSet/paramsSetInfo.vue

@@ -33,9 +33,32 @@
           :model-value="(deviceDetal.outsideHd == null ? $t('device.noData') : deviceDetal.outsideHd + $t('device.humidity'))"
           readonly />
       </div>
+      <div v-if="type == '2'">
+        <van-field :label="$t('device.humidityInCabinet')"
+          :model-value="(deviceDetal.cabinetHd == null ? $t('device.noData') : deviceDetal.cabinetHd + $t('device.humidity'))"
+          readonly />
+        <van-field v-model="interval" :label="$t('device.increaseOrDecrease')" class="paramsList">
+          <template #button>
+            <van-button size="small" type="primary" class="updataButton" @click="updateInterval(0)">{{
+              $t('device.submitUpdates') }}</van-button>
+          </template>
+        </van-field>
+        <van-field :label="$t('device.winterParameters')" class="inputButton">
+          <template #input>
+            <van-button size="small" type="primary" class="updataButton" @click="updateInterval(1)">{{
+              $t('device.submitUpdates') }}</van-button>
+          </template>
+        </van-field>
+        <van-field :label="$t('device.summerParameters')" class="inputButton">
+          <template #input>
+            <van-button size="small" type="primary" class="updataButton" @click="updateInterval(2)">{{
+              $t('device.submitUpdates') }}</van-button>
+          </template>
+        </van-field>
+      </div>
       <div class="paramsList" v-for="(item, key) in paramsList" :key="key">
-        <van-field :model-value="item.val" @update:model-value="onUpdateParameters(item, key, $event)" v-if="item.name != 'M502' && item.name != 'M506'" name="phone" type="tel"
-          :label="paramName[key]">
+        <van-field :model-value="item.val" @update:model-value="onUpdateParameters(item, key, $event)"
+          v-if="item.name != 'M502' && item.name != 'M506'" name="phone" type="tel" :label="paramName[key]">
           <template #button>
             <van-button size="small" type="primary" class="updataButton" @click="updateParams(item, key)">{{
               $t('device.submitUpdates') }}</van-button>
@@ -44,7 +67,8 @@
         <div class="flex-row" v-else>
           <span class="txt3 o-pl-15 o-mtb-18" v-if="item.name != 'M502'">{{ paramName[key] }}
           </span>
-          <van-switch v-if="item.name != 'M502'" class="o-mt-8" :model-value="checked[key]" @update:model-value="onUpdateValue(item, key)">
+          <van-switch v-if="item.name != 'M502'" class="o-mt-8" :model-value="checked[key]"
+            @update:model-value="onUpdateValue(item, key)">
           </van-switch>
         </div>
       </div>
@@ -56,7 +80,7 @@
 import { onMounted, ref } from "vue";
 import sHeader from "@/components/SimpleHeader";
 import { useRoute } from "vue-router";
-import { getDeviceDetal, getParameters, updateParameters } from "@/service/device";
+import { getDeviceDetal, getParameters, updateParameters, humidityParameters } from "@/service/device";
 import { showFailToast, showSuccessToast, showConfirmDialog, showToast } from "vant";
 import { useI18n } from 'vue-i18n';
 import { styleUrl } from "../../../common/js/utils";
@@ -76,6 +100,7 @@ export default {
     const type = ref("");
     const isChange = ref(false);
     const howLong = ref([]);
+    const interval = ref("");
 
     // 初始化页面获取列表
     onMounted(async () => {
@@ -101,7 +126,9 @@ export default {
       const { data } = await getDeviceDetal({ id: deviceId });
       if (data.code === "00000") {
         deviceDetal.value = data.data;
-        getParametersFun();
+        if (route.query.type != "2") {
+          getParametersFun();
+        }
       } else {
         showFailToast(data.message);
       }
@@ -154,8 +181,8 @@ export default {
       };
       showConfirmDialog({
         title: t('device.tips'),
-        message: t('device.isUpdate') + paramName.value[key] + t('device.to') + item.val + '?'+ (isChange.value ? t('device.attention') : ''),
-      }).then(async() => {
+        message: t('device.isUpdate') + paramName.value[key] + t('device.to') + item.val + '?' + (isChange.value ? t('device.attention') : ''),
+      }).then(async () => {
         const { data } = await updateParameters(params);
         if (data.code) {
           showSuccessToast(t('device.modificationSucceeded'));
@@ -188,6 +215,39 @@ export default {
         // on cancel
       });
     };
+
+    // 一键递增递减
+    const updateInterval = (value) => {
+      const params = {
+        id: deviceId,
+        name: "allUpdate",
+        val: interval.value,
+      };
+      if (value === 0) {
+        params.name = "allUpdate";
+        params.val = interval.value;
+      } else if (value === 0) {
+        params.name = "winter";
+        params.val = "winter";
+      } else {
+        params.name = "summer";
+        params.val = "summer";
+      }
+      showConfirmDialog({
+        title: t('device.tips'),
+        message: t('device.isUpdate') + '?',
+      }).then(async () => {
+        const { data } = await humidityParameters(params);
+        if (data.code) {
+          showSuccessToast(t('device.modificationSucceeded'));
+        } else {
+          showFailToast(data.message);
+        }
+      }).catch(() => {
+
+      })
+    }
+
     return {
       deviceDetal,
       paramsTitle,
@@ -199,12 +259,16 @@ export default {
       onUpdateValue,
       type,
       onUpdateParameters,
+      interval,
+      updateInterval
     };
   },
 };
 </script>
-<style lang="less" scoped>@import "../../../common/style/common";
+<style lang="less" scoped>
+@import "../../../common/style/common";
 
 .paramsValue {
   margin: 0 40px;
-}</style>
+}
+</style>

+ 41 - 0
src/views/feedback.vue

@@ -0,0 +1,41 @@
+<template>
+  <div class="feedback">
+    <s-header :name="$t('user.feedback')" :noback="false"></s-header>
+    <iframe height="100%" width="100%" :src="surveyUrl" frameborder="0" allowfullscreen></iframe>
+  </div>
+</template>
+
+<script>
+// 导入接口
+import sHeader from "@/components/SimpleHeader";
+import { onMounted, ref } from '@vue/runtime-core';
+import { getLocal } from '@/common/js/utils';
+export default {
+  components: {
+    sHeader
+  },
+  setup() {
+    // const user = getLoginUser();
+    const surveyUrl = ref('');
+    let languageName = ref(getLocal("curLang"));
+    // 刚进页面
+    onMounted(() => {
+      // 加载样式
+      // styleUrl('feedback');
+      console.log(languageName.value);
+      if(languageName.value == 'zh') {
+        surveyUrl.value = 'https://form.antdv.com/r/6533d89c645e0035';
+      } else {
+        surveyUrl.value = 'https://form.antdv.com/r/65acd89a687600a5';
+      }
+    });
+  
+    return {
+      surveyUrl
+    };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+</style>

+ 21 - 5
src/views/home/index.vue

@@ -24,7 +24,7 @@
       <!-- 没有数据概览M14权限的人看不到数据概览和ECharts -->
       <!-- 数据概览 -->
       <div v-if="showDataDiv" class="titleBox flex-col">
-        <div class="layer2 flex-row">
+        <div class="layer2 l-flex-RC">
           <div class="section5 flex-col"></div>
           <div class="TextGroup2 flex-col">
             <span class="txt4">{{ $t("home.dataOverview") }}</span>
@@ -114,6 +114,13 @@
         <div class="o-w" style="max-height: 50vh; overflow-y: auto" v-html="noticeContent.note"></div>
       </template>
     </kDialog>
+    <van-dialog v-model:show="showAlarm" :title="$t('home.alarmTitle')" @confirm="confirmAlarm">
+      <div style="max-height: 30vh; overflow-y: auto;">
+        <div v-for="(item, index) in alarmList" :key="index" style="padding: 2px 5px;">
+          <van-cell :title="$t('home.alarmDevice') + (item.name ? item.name : item.clientId.slice(-6)) + $t('home.alarmContent') + item.alarmContent" />
+        </div>
+      </div>
+    </van-dialog>
   </div>
 </template>
 
@@ -185,6 +192,7 @@ export default {
         }, 500);
       });
     };
+    const firstLogin = ref(true);
     const user = getLoginUser();
     const router = useRouter();
     const userName = ref(user.name);
@@ -374,6 +382,7 @@ export default {
         const loginSysString = localStorage.getItem("loginSys");
         sys.value = JSON.parse(loginSysString);
       }
+      firstLogin.value = localStorage.getItem('firstLogin');
       // 设置菜单权限
       menuSet();
       // 设置菜单权限, 只执行一次
@@ -405,13 +414,18 @@ export default {
           todayDate: dateUtil.formateDate(new Date(), "yyyy-MM-dd"), // 当天时间
         };
         const { data } = await getIsAlarm(queryParams);
-        if(data.data.length > 0) {
-          showAlarm.value = true;
+        if (data.data != null) {
+          if (firstLogin.value == 'true') {
+            showAlarm.value = true;
+          }
           alarmList.value = data.data;
-          console.log("alarmList", alarmList.value)
         }
       }
     });
+    
+    const confirmAlarm = () => {
+      localStorage.setItem('firstLogin', false);
+    }
 
     const menuList = [];
 
@@ -428,7 +442,7 @@ export default {
       // 组合菜单权限
       user.menuCodeList.forEach((item) => {
         for (const key in $M_Menus) {
-          // 设备管理M1,设备查看M2,订单数据M4,任务消息M6,数据概览M14,订单退款M16,系统脱机M17 这些图标不用加载到底部菜单上
+          // 设备管理M1,设备查看M2,订单数据M4,任务消息M6,销售排行M11,数据概览M14,订单退款M16,系统脱机M17 这些图标不用加载到底部菜单上
           if (
             item === key &&
             (
@@ -436,6 +450,7 @@ export default {
               item !== "M2" && // M2本身就无logo
               item !== "M4" &&
               item !== "M6" &&
+              item !== "M11" &&
               item !== "M14" &&
               item !== "M16" &&
               item !== "M17"
@@ -606,6 +621,7 @@ export default {
       currencySymbol,
       showAlarm,
       alarmList,
+      confirmAlarm,
     };
   },
 

+ 39 - 13
src/views/labelMan/add.vue

@@ -11,7 +11,7 @@
             },
           ]" />
       </div>
-      <div class="kBordBott">
+      <!-- <div class="kBordBott">
         <van-field colon :border="false" required clearable name="type" :label="$t('labelMan.add.type')"
           :placeholder="$t('labelMan.add.typePlace')" :rules="[
             {
@@ -27,7 +27,7 @@
             </van-radio-group>
           </template>
         </van-field>
-      </div>
+      </div> -->
       <div v-if="cofficentForm.type === '0'" class="kBordBott cust_vantBorder">
         <van-field colon :border="false" required @click-input="busiAdminInpClk" readonly clearable
           v-model="cofficentForm.adminNames" name="adminNames" :label="$t('labelMan.add.merchant')"
@@ -72,10 +72,10 @@
     </van-form>
     <!-- 商家弹窗 -->
     <kSelectPop @selconfirm="selAdminConfirm" ref="kSelectPopAdminRef" :selOptions="selAdminOptions"
-      :selTitleAndName="['username', 'username']"></kSelectPop>
+      @searchData="searchAdminData" :selTitleAndName="['username', 'id']"></kSelectPop>
     <!-- 机器弹窗 -->
     <kSelectPop @selconfirm="selEquipConfirm" ref="kSelectPopEquipRef" :selOptions="selEquipOptions"
-      :selTitleAndName="['name', 'name']"></kSelectPop>
+      @searchData="searchEquData" :selTitleAndName="['name', 'id']"></kSelectPop>
   </div>
 </template>
 
@@ -131,15 +131,26 @@ export default {
     const selAdminOptions = ref([]);
     const kSelectPopAdminRef = ref(null);
     // 商家弹窗的确定按钮
-    const selAdminConfirm = (e) => {
-      if (e.length > 0) {
+    const selAdminConfirm = (e, e1) => {
+      if (e.length > 0 && e1.length > 0) {
         cofficentForm.value.adminNames = e.join(",");
+        cofficentForm.value.adminIds = e1.join(",");
       } else {
         cofficentForm.value.adminNames = "";
       }
       kSelectPopAdminRef.value.selPopClose();
     };
 
+    const searchAdminData = (e) => {
+      // console.log("用户列表", e);
+      selAdminOptions.value = e;
+    }
+
+    const searchEquData = (e) => {
+      // console.log("设备列表", e);
+      selEquipOptions.value = e;
+    }
+
     // 点击机器列表
     const busiEquipInpClk = () => {
       if (cofficentForm.value.equipmentNames) {
@@ -154,11 +165,13 @@ export default {
     const selEquipOptions = ref([]);
     const kSelectPopEquipRef = ref(null);
     // 机器弹窗的确定按钮
-    const selEquipConfirm = (e) => {
-      if (e.length > 0) {
+    const selEquipConfirm = (e, e1) => {
+      if (e.length > 0 && e1.length > 0) {
         cofficentForm.value.equipmentNames = e.join(",");
+        cofficentForm.value.equipmentIds = e1.join(",");
       } else {
         cofficentForm.value.equipmentNames = "";
+        cofficentForm.value.equipmentIds = "";
       }
       kSelectPopEquipRef.value.selPopClose();
     };
@@ -194,10 +207,12 @@ export default {
     // 表单参数
     let cofficentForm = ref({
       adminId: user.id,
+      adminIds: "",
       name: "",
-      type: "0",
+      type: "1",
       adminNames: "",
       equipmentNames: "",
+      equipmentIds: "",
     });
     // 路由
     const router = useRouter();
@@ -207,10 +222,14 @@ export default {
       // 判断type清空商家或机器参数
       if (param.type === "0") {
         param.equipmentNames = "";
+        param.equipmentIds = "";
         param.adminNames = JSON.stringify(param.adminNames.split(","));
+        param.adminIds = JSON.stringify(param.adminIds.split(","));
       } else {
         param.adminNames = "";
+        param.adminIds = "";
         param.equipmentNames = JSON.stringify(param.equipmentNames.split(","));
+        param.equipmentIds = JSON.stringify(param.equipmentIds.split(","));
       }
       // 如果是编辑
       let res;
@@ -220,11 +239,16 @@ export default {
         res = await Api_postAddLabel(param);
       }
       const { data } = res;
-      if (data.code === "00000") {
-        showToast(data.message);
+      if (data.code === "00000" && cofficentForm.value.id) {
+        showToast(t('labelMan.add.editSuccess'));
+        setTimeout(() => {
+          router.go(-1);
+        }, 1000);
+      } else if (data.code === "00000" && !cofficentForm.value.id) {
+        showToast(t('labelMan.add.addSuccess'));
         setTimeout(() => {
-          router.back();
-        }, 500);
+          router.go(-1);
+        }, 1000);
       }
     };
     return {
@@ -239,6 +263,8 @@ export default {
       selEquipConfirm,
       busiAdminInpClk,
       busiEquipInpClk,
+      searchAdminData,
+      searchEquData,
     };
   },
 };

+ 8 - 10
src/views/labelMan/index.vue

@@ -47,7 +47,8 @@
         </div>
       </div>
     </div>
-    <kTabs tabWidth="100%" @tabchg="tabChg" :tabList="tabList"></kTabs>
+    <div class="intervalRow"></div>
+    <!-- <kTabs tabWidth="100%" @tabchg="tabChg" :tabList="tabList"></kTabs> -->
     <div class="contentCon">
       <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">
@@ -85,7 +86,7 @@
 
 <script>
 // 导入tab组件
-import kTabs from "../../components/commom/kTabs/index.vue";
+// import kTabs from "../../components/commom/kTabs/index.vue";
 // 导入公用方法
 import { Format_time, getLoginUser, styleUrl } from "../../common/js/utils";
 // 导入弹窗
@@ -98,7 +99,7 @@ import { useRouter } from "vue-router";
 import { showToast } from "vant";
 import { useI18n } from "vue-i18n";
 export default {
-  components: { sHeader, kDialog, kTabs },
+  components: { sHeader, kDialog, },
   setup() {
     const { t } = useI18n();
     // 点击tab
@@ -139,17 +140,14 @@ export default {
           ids.push(item.id);
         }
       });
-      let param = {
-        ids,
-      };
-      Api_getDelLabel(param).then((res) => {
+      Api_getDelLabel(ids).then((res) => {
         console.log(res);
         if (res.data.code === "00000") {
           isDelete.value = false;
-          showToast(res.data.message);
+          showToast(t("advertManage.delSuccess"));
           setTimeout(() => {
             getList();
-          }, 500);
+          }, 1000);
         }
       });
     };
@@ -193,7 +191,7 @@ export default {
     // 筛选条件
     const searchParam = {
       adminId: user.id,
-      type: 0,
+      type: 1,
     }
     // 获取列表
     const getList = () => {

+ 82 - 28
src/views/login.vue

@@ -6,10 +6,15 @@
     ></s-header>
     <div class="loginLogoBox l-re">
       <div class="loginLogo"></div>
-      <div class="l-ab pointer languageCon" @click="languageClk">
-        <div class="c-text-b">
+      <div class="l-ab pointer languageCon">
+        <!-- <div class="c-text-b">
           {{ compLang }}
-        </div>
+        </div> -->
+        <van-popover :offset="[0, 8]" theme="dark" v-model:show="showPopover" :actions="actions" @select="onSelect">
+          <template #reference>
+            <van-button style="height: auto; color: #4d6add;" type="primary">{{ currentLan }}</van-button>
+          </template>
+        </van-popover>
       </div>
     </div>
     <div class="loginTitleBox l-flex-center">
@@ -82,40 +87,43 @@ import {Locale} from "vant";
 import enUS from "vant/es/locale/lang/en-US";
 // 引入简体中文语言包
 import zhCN from "vant/es/locale/lang/zh-CN";
+// 引入日文语言包
+import jaJP from 'vant/es/locale/lang/ja-JP';
 
 export default {
   setup() {
     let languageName = ref(getLocal("curLang"));
     const {locale, t} = useI18n();
     // 语言点击
-    const languageClk = () => {
-      if (languageName.value === "zh") {
-        locale.value = "en";
-        languageName.value = "en";
-        setLocal("curLang", "en");
-        // 切换vant语言包
-        Locale.use("en-US", enUS);
-      } else {
-        locale.value = "zh";
-        languageName.value = "zh";
-        setLocal("curLang", "zh");
-        // 切换vant语言包
-        Locale.use("zh-CN", zhCN);
-      }
-    };
-    const compLang = computed(() => {
-      if (languageName.value === "en") {
-        return "中文";
-      } else {
-        return "English";
-      }
-    });
+    // const languageClk = () => {
+    //   if (languageName.value === "zh") {
+    //     locale.value = "en";
+    //     languageName.value = "en";
+    //     setLocal("curLang", "en");
+    //     // 切换vant语言包
+    //     Locale.use("en-US", enUS);
+    //   } else {
+    //     locale.value = "zh";
+    //     languageName.value = "zh";
+    //     setLocal("curLang", "zh");
+    //     // 切换vant语言包
+    //     Locale.use("zh-CN", zhCN);
+    //   }
+    // };
+    // const compLang = computed(() => {
+    //   if (languageName.value === "en") {
+    //     return "中文";
+    //   } else {
+    //     return "English";
+    //   }
+    // });
     const checked = ref(false); // 是否记住密码状态
     const userName = ref("");
     const userPwd = ref("");
     const router = useRouter();
     const route = useRoute();
     const sys = ref(null);
+    const currentLan = ref(''); // 当前语言
     // 页面初始化
     onMounted(() => {
       // 加载样式
@@ -137,6 +145,13 @@ export default {
         userName.value = savedUsername;
         userPwd.value = savedPassword;
       }
+      if (languageName.value === "zh") {
+        currentLan.value = "中文";
+      } else if (languageName.value === "ja") {
+        currentLan.value = "日本語";
+      } else {
+        currentLan.value = "English";
+      }
     });
     const getSysFun = async () => {
       const {data} = await getSys({
@@ -148,6 +163,41 @@ export default {
         sys.value = data.data;
       }
     };
+
+
+    const showPopover = ref(false);
+
+    // 通过 actions 属性来定义菜单选项
+    const actions = [
+      { text: '中文' },
+      { text: 'English' },
+      { text: '日本語' },
+    ];
+    // 切换语言
+    const onSelect = (action) => {
+      // showToast(action.text);
+      currentLan.value = action.text;
+      if (action.text === "中文") {
+        locale.value = "zh";
+        languageName.value = "zh";
+        setLocal("curLang", "zh");
+        // 切换vant语言包
+        Locale.use("zh-CN", zhCN);
+      } else if (action.text === "English") {
+        locale.value = "en";
+        languageName.value = "en";
+        setLocal("curLang", "en");
+        // 切换vant语言包
+        Locale.use("en-US", enUS);
+      } else if (action.text === "日本語") {
+        locale.value = "ja";
+        languageName.value = "ja";
+        setLocal("curLang", "ja");
+        // 切换vant语言包
+        Locale.use("ja-JP", jaJP);
+      }
+    }
+
     // 登录
     const onSubmit = async (values) => {
       const {data} = await login({
@@ -168,6 +218,7 @@ export default {
         }
         // console.log('loginUser JSON:', JSON.stringify(data.data));
         showSuccessToast(t('login.loginSucess'));
+        localStorage.setItem('firstLogin', true);
         // 需要刷新页面,否则 axios.js 文件里的 token 不会被重置
         // window.location.href = '/';
         window.location.href = '/sc/';
@@ -229,13 +280,16 @@ export default {
       registerClick,
       forgetPassword,
       sys,
-      compLang,
-      languageClk,
+      // compLang,
+      // languageClk,
       isInWeChat,
       state,
       wxLoginHandler,
       getOpenid,
-
+      actions,
+      onSelect,
+      showPopover,
+      currentLan,
     };
   },
   components: {

+ 1 - 0
src/views/merchantManage/index.vue

@@ -134,6 +134,7 @@ export default {
             setLocal("loginUser", JSON.stringify(res.data.data));
             // console.log('loginUser JSON:', JSON.stringify(data.data));
             showSuccessToast(t('login.loginSucess'));
+            localStorage.setItem('firstLogin', true);
             // 需要刷新页面,否则 axios.js 文件里的 token 不会被重置
             window.location.href = '/sc/';
             setTimeout(() => {

+ 28 - 6
src/views/robotRanking.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="robotRanking flex-col">
+  <div class="robotRanking flex-col" v-if="showRobotRankingDiv">
     <div class="box1 flex-col">
       <s-header :name="$t('robotRanking.machineSalesRanking')" :noback="true" :isFixed="false"></s-header>
       <div class="box3 flex-col">
@@ -153,6 +153,15 @@
         @confirm="yearPopConfirm" @cancel="yearShow = false" />
     </van-popup>
   </div>
+  <div v-else class="noPermission" style="display: flex; justify-content: center;">
+    <div class="box1 flex-col" style="text-align: center;">
+      <s-header :name="$t('robotRanking.machineSalesRanking')" :noback="true" :isFixed="false"></s-header>
+      <view>
+        <br />
+      </view>
+      <view>{{ $t('robotRanking.noPermission') }}</view>
+    </div>
+  </div>
 </template>
 
 <script>
@@ -722,6 +731,11 @@ export default {
       });
     };
     const user = getLoginUser();
+    // 默认能看到机器排行
+    const showRobotRankingDiv = ref(true);
+    console.log("user.menuCodeList>>>", user.menuCodeList);
+    console.log("user.type>>>", user.type);
+    const isM11Included = user.menuCodeList.some((item) => item === "M11");
     // 日、周、月、年的图表
     const dayChartBox = ref();
     const weekChartBox = ref();
@@ -737,12 +751,18 @@ export default {
       searchForm.companyTypeName = t("robotRanking.whole");
       searchForm.machineTypeName = t("robotRanking.whole");
       // 查询是否有订单数据权限
-      const isOrderData = user.menuCodeList.some((item) => {
-        return item === "M4";
-      })
-
+      // const isOrderData = user.menuCodeList.some((item) => {
+      //   return item === "M4";
+      // })
+      // 子商家type=3和公司人员type=1,默认看不到 
+      if ((user.type > 2 || user.type === 1) && !isM11Included) {
+        showRobotRankingDiv.value = false;
+      }
       // 如果是type为admin或者商家或者是有订单数据权限M4的子商家才可以查看
-      if (user.type === 0 || user.type === 2 || isOrderData) {
+      // if (user.type === 0 || user.type === 2 || isOrderData) {
+      //   init();
+      // }
+      if (user.type === 0 || user.type === 2 || isM11Included) {
         init();
       }
 
@@ -869,6 +889,8 @@ export default {
       maTypeDefaIdx,
       chgTypeDefaIdx,
       isAdmin,
+
+      showRobotRankingDiv,
     };
   },
   components: { sHeader, kTabs, kDialog, kNoData },

+ 8 - 0
src/views/user.vue

@@ -214,6 +214,14 @@
             </div>
           </div>
 
+          <!-- 意见反馈 -->
+          <div v-if="user.type > 1" class="taskListRow flex-col" @click="pushPageList('/feedback')">
+            <div class="taskIcon feedbackIcon"></div>
+            <div class="taskRight">
+              <div class="taskTitle">{{ $t("user.feedback") }}</div>
+            </div>
+          </div>
+
           <!-- 自动充值 -->
           <!-- <div v-if="isInland" class="taskListRow flex-col" @click="operUnipay()">
             <div class="taskIcon selfPayIcon"></div>