فهرست منبع

图标暗黑模式修改

dengrui 1 ماه پیش
والد
کامیت
d2b9e3b810

+ 53 - 48
src/views/device/pac/index.vue

@@ -1,42 +1,42 @@
 <template>
   <div class="mainContentBox">
     <avue-crud
-        ref="crudRef"
-        v-model:search="search"
-        v-model="form"
-        :data="data"
-        :option="option"
-        v-model:page="page"
-        @row-save="createRow"
-        @row-update="updateRow"
-        @row-del="deleteRow"
-        @search-change="searchChange"
-        @search-reset="resetChange"
-        @size-change="dataList"
-        @current-change="dataList"
-        @selection-change="selectionChange"
+      ref="crudRef"
+      v-model:search="search"
+      v-model="form"
+      :data="data"
+      :option="option"
+      v-model:page="page"
+      @row-save="createRow"
+      @row-update="updateRow"
+      @row-del="deleteRow"
+      @search-change="searchChange"
+      @search-reset="resetChange"
+      @size-change="dataList"
+      @current-change="dataList"
+      @selection-change="selectionChange"
     >
       <template #collect="scope">
         <el-switch
-            active-value="1"
-            inactive-value="0"
-            inline-prompt
-            active-text="是"
-            inactive-text="否"
-            v-model="scope.row.collect"
-            @click="changeItem($event,scope.row)"
-            class="ml-2"
-            style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
+          active-value="1"
+          inactive-value="0"
+          inline-prompt
+          active-text="是"
+          inactive-text="否"
+          v-model="scope.row.collect"
+          @click="changeItem($event, scope.row)"
+          class="ml-2"
+          style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
         />
       </template>
-      <template #menu="{size,row,index}">
-        <el-button
+      <template #menu="{ size, row, index }">
+        <!-- <el-button
             type="primary"
             link
             size="small"
             @click="restart(row)"
         ><i-ep-edit />重启
-        </el-button>
+        </el-button> -->
       </template>
       <template #menu-left="{ size }">
         <el-button
@@ -54,7 +54,7 @@
 <script setup>
 import { ref, getCurrentInstance } from "vue";
 import { useCrud } from "@/hooks/userCrud";
-import {configSave,deviceRestart,deviceUpdateCollect} from "@/api/device";
+import { configSave, deviceRestart, deviceUpdateCollect } from "@/api/device";
 import { useCommonStoreHook } from "@/store";
 import dictDataUtil from "@/common/configs/dictDataUtil";
 const { isShowTable, tableType } = toRefs(useCommonStoreHook());
@@ -76,29 +76,38 @@ const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
   useCrud({
     src: "/api/v1/pac",
   });
-const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } = Methords; //增删改查
+const { dataList, createRow, updateRow, deleteRow, searchChange, resetChange } =
+  Methords; //增删改查
 const { selectionChange, multipleDelete } = Methords; //选中和批量删除事件
 const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
 const crudRef = ref(null); //crudRef.value 获取avue-crud对象
-const changeItem =(obj,row) => {
-  deviceUpdateCollect({id: row.id,collect: row.collect,deviceNo: row.deviceNo}).then((data)=>{
-    if(data.code === '200'){
+const changeItem = (obj, row) => {
+  deviceUpdateCollect({
+    id: row.id,
+    collect: row.collect,
+    deviceNo: row.deviceNo,
+  }).then((data) => {
+    if (data.code === "200") {
       ElMessage.success(data.msg);
-    }else{
-      row.collect = row.collect === '0' ? '1' : '0'
+    } else {
+      row.collect = row.collect === "0" ? "1" : "0";
       ElMessage.error(data.msg);
     }
-  })
-}
-const restart =(row) => {
-  deviceRestart({id: row.id,collect: row.collect,deviceNo: row.deviceNo}).then((data)=>{
-    if(data.code === '200'){
+  });
+};
+const restart = (row) => {
+  deviceRestart({
+    id: row.id,
+    collect: row.collect,
+    deviceNo: row.deviceNo,
+  }).then((data) => {
+    if (data.code === "200") {
       ElMessage.success(data.msg);
-    }else{
+    } else {
       ElMessage.error(data.msg);
     }
-  })
-}
+  });
+};
 // 设置表格列或者其他自定义的option
 option.value = Object.assign(option.value, {
   delBtn: false,
@@ -139,9 +148,7 @@ option.value = Object.assign(option.value, {
       width: 130,
       editDisabled: true,
       overHidden: true,
-      dicUrl:
-        dictDataUtil.request_url +
-        dictDataUtil.TYPE_CODE.device_type,
+      dicUrl: dictDataUtil.request_url + dictDataUtil.TYPE_CODE.device_type,
       props: {
         label: "dictLabel",
         value: "dictValue",
@@ -161,9 +168,7 @@ option.value = Object.assign(option.value, {
       width: 160,
       overHidden: true,
       search: true,
-      dicUrl:
-          dictDataUtil.request_url +
-          dictDataUtil.TYPE_CODE.device_status,
+      dicUrl: dictDataUtil.request_url + dictDataUtil.TYPE_CODE.device_status,
       props: {
         label: "dictLabel",
         value: "dictValue",
@@ -227,7 +232,7 @@ option.value = Object.assign(option.value, {
       props: {
         label: "deptName",
         value: "id",
-      }
+      },
     },
     {
       label: "设备位置",

+ 34 - 23
src/views/plan/schedule/index.vue

@@ -28,13 +28,13 @@
           >派工调整</el-button
         >
         <el-button
-            icon="el-icon-edit"
-            text
-            v-if="row.productLineCode === '1'"
-            @click="handleDevice(row, index)"
-            type="primary"
-            :size="size"
-        >资源调整</el-button
+          icon="el-icon-edit"
+          text
+          v-if="row.productLineCode === '1'"
+          @click="handleDevice(row, index)"
+          type="primary"
+          :size="size"
+          >资源调整</el-button
         >
       </template>
       <template #menu-left>
@@ -42,10 +42,10 @@
       </template>
     </avue-crud>
     <el-dialog
-        v-model="dialog4.visible"
-        :title="dialog4.title"
-        width="950px"
-        @close="dialog4.visible = false"
+      v-model="dialog4.visible"
+      :title="dialog4.title"
+      width="950px"
+      @close="dialog4.visible = false"
     >
       <plan_device_task :workOrderInfo="form" />
     </el-dialog>
@@ -61,14 +61,14 @@ import { useDictionaryStore } from "@/store";
 import { getStatistics } from "@/api/order/index";
 import * as echarts from "echarts";
 const tableRowClassName = ({ row, rowIndex }) => {
-  if(row.planStartEnd){
+  if (row.planStartEnd) {
     const currentDate = new Date(); // 获取当前日期
     const compareDate = new Date(row.planStartEnd); // 设置要比较的日期
-    if (currentDate > compareDate && row.state !== '2' && row.state !== '3') {
-      return { backgroundColor: '#F1BFBFFF'};
+    if (currentDate > compareDate && row.state !== "2" && row.state !== "3") {
+      return { backgroundColor: "#F1BFBFFF" };
     }
   }
-  return '';
+  return "";
 };
 // 数据字典相关
 const { dicts } = useDictionaryStore();
@@ -85,7 +85,7 @@ const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等
 
 const crudRef = ref(null); //crudRef.value 获取avue-crud对象
 const stationList = ref([]);
-const userList = ref([])
+const userList = ref([]);
 const charts = shallowRef(null);
 const handleEdit = (row, index) => {
   queryStationByLineId(row.productLineId).then((data) => {
@@ -93,10 +93,10 @@ const handleEdit = (row, index) => {
   });
   crudRef.value && crudRef.value.rowEdit(row, index);
 };
-const handleDevice =(row,index) =>{
-  form.value = row
-  dialog4.visible = true
-}
+const handleDevice = (row, index) => {
+  form.value = row;
+  dialog4.visible = true;
+};
 const dialog4 = reactive({
   title: "资源调整",
   visible: false,
@@ -115,9 +115,16 @@ onMounted(() => {
     const { data } = res;
     const { value, key } = data;
     charts.value.setOption({
+      darkMode: true,
+      textStyle: {
+        color: "#fff",
+      },
       title: {
         text: "任务状态统计图",
         left: "center",
+        textStyle: {
+          color: "#fff",
+        },
       },
       tooltip: {
         trigger: "item",
@@ -125,7 +132,11 @@ onMounted(() => {
       xAxis: {
         data: key,
       },
-      yAxis: {},
+      yAxis: {
+        textStyle: {
+          color: "#000",
+        },
+      },
       series: [
         {
           type: "bar",
@@ -252,7 +263,7 @@ option.value = Object.assign(option.value, {
         return val.operationSort + 1;
       },
       editDisabled: true,
-      width:55,
+      width: 55,
     },
     {
       label: "状态",
@@ -293,7 +304,7 @@ option.value = Object.assign(option.value, {
     {
       label: "来源",
       prop: "source",
-      editDisabled: true
+      editDisabled: true,
     },
   ],
 });

+ 24 - 0
src/views/report/environment/temperature/index.vue

@@ -61,6 +61,12 @@ onMounted(() => {
   charts1.value.setOption({
     title: {
       text: "温度",
+      textStyle: {
+        color: "#fff",
+      },
+    },
+    textStyle: {
+      color: "#fff",
     },
     series: [
       {
@@ -171,8 +177,14 @@ onMounted(() => {
     ],
   });
   charts2.value.setOption({
+    textStyle: {
+      color: "#fff",
+    },
     title: {
       text: "温度",
+      textStyle: {
+        color: "#fff",
+      },
     },
     tooltip: {
       trigger: "axis",
@@ -203,8 +215,14 @@ onMounted(() => {
     ],
   });
   charts3.value.setOption({
+    textStyle: {
+      color: "#fff",
+    },
     title: {
       text: "湿度",
+      textStyle: {
+        color: "#fff",
+      },
     },
     series: [
       {
@@ -315,8 +333,14 @@ onMounted(() => {
     ],
   });
   charts4.value.setOption({
+    textStyle: {
+      color: "#fff",
+    },
     title: {
       text: "湿度",
+      textStyle: {
+        color: "#fff",
+      },
     },
     tooltip: {
       trigger: "axis",

+ 3 - 0
src/views/report/statistics/dailystorage/index.vue

@@ -333,6 +333,9 @@ const setChartSeries = () => {
   chartSeriesData.value = array;
 };
 const echartOption = ref({
+  textStyle: {
+    color: "#fff",
+  },
   tooltip: {
     trigger: "axis",
     axisPointer: {

+ 40 - 37
src/views/report/statistics/outTime/components/PieChart1.vue

@@ -7,7 +7,7 @@
 
 <script setup lang="ts">
 import * as echarts from "echarts";
-import {defineProps, ref} from "vue";
+import { defineProps, ref } from "vue";
 
 const props = defineProps({
   id: {
@@ -31,54 +31,57 @@ const props = defineProps({
   list: {
     type: Array,
     default: [],
-    required: true
-  }
+    required: true,
+  },
 });
 const options = {
-  title : {
-    text: '订单准时完成率',
-    x:'center'
+  title: {
+    text: "订单准时完成率",
+    x: "center",
+    textStyle: {
+      color: "#fff",
+    },
   },
-  tooltip : {
-    trigger: 'item',
-    formatter: "{b} : {c} ({d}%)"
+  tooltip: {
+    trigger: "item",
+    formatter: "{b} : {c} ({d}%)",
   },
   legend: {
-    orient : 'vertical',
-    x : 'left',
-    data:['直接访问','邮件营销','联盟广告','视频广告','搜索引擎']
+    orient: "vertical",
+    x: "left",
+    data: ["直接访问", "邮件营销", "联盟广告", "视频广告", "搜索引擎"],
   },
-  calculable : true,
-  series : [
+  calculable: true,
+  series: [
     {
-      name:'访问来源',
-      type:'pie',
-      radius : '75%',
-      center: ['50%', '50%'],
-      data:[
-        { name:'直接访问',value:70},
-        {value:30, name:'邮件营销'},
-      ]
-    }
-  ]
+      name: "访问来源",
+      type: "pie",
+      radius: "75%",
+      center: ["50%", "50%"],
+      data: [
+        { name: "直接访问", value: 70 },
+        { value: 30, name: "邮件营销" },
+      ],
+    },
+  ],
 };
 
 const chart = ref<any>("");
 watch?.(
-    () => props.list,
-    (newVal) => {
-      options.series[0].data = props.list
-      options.legend.data = []
-      props.list.forEach(item=>{
-        options.legend.data.push(item.name)
-      })
-      handle()
-    }
+  () => props.list,
+  (newVal) => {
+    options.series[0].data = props.list;
+    options.legend.data = [];
+    props.list.forEach((item) => {
+      options.legend.data.push(item.name);
+    });
+    handle();
+  }
 );
 
-const handle=()=>{
+const handle = () => {
   chart.value = markRaw(
-      echarts.init(document.getElementById(props.id) as HTMLDivElement)
+    echarts.init(document.getElementById(props.id) as HTMLDivElement)
   );
 
   chart.value.setOption(options);
@@ -86,9 +89,9 @@ const handle=()=>{
   window.addEventListener("resize", () => {
     chart.value.resize();
   });
-}
+};
 onMounted(() => {
- handle();
+  handle();
 });
 
 onActivated(() => {

+ 39 - 36
src/views/report/statistics/outTime/components/PieChart2.vue

@@ -7,7 +7,7 @@
 
 <script setup lang="ts">
 import * as echarts from "echarts";
-import {defineProps, ref} from "vue";
+import { defineProps, ref } from "vue";
 
 const props = defineProps({
   id: {
@@ -31,54 +31,57 @@ const props = defineProps({
   list: {
     type: Array,
     default: [],
-    required: true
-  }
+    required: true,
+  },
 });
 const options = {
-  title : {
-    text: '工单准时完成率',
-    x:'center'
+  title: {
+    text: "工单准时完成率",
+    x: "center",
+    textStyle: {
+      color: "#fff",
+    },
   },
-  tooltip : {
-    trigger: 'item',
-    formatter: "{b} : {c} ({d}%)"
+  tooltip: {
+    trigger: "item",
+    formatter: "{b} : {c} ({d}%)",
   },
   legend: {
-    orient : 'vertical',
-    x : 'left',
-    data:['直接访问','邮件营销','联盟广告','视频广告','搜索引擎']
+    orient: "vertical",
+    x: "left",
+    data: ["直接访问", "邮件营销", "联盟广告", "视频广告", "搜索引擎"],
   },
-  calculable : true,
-  series : [
+  calculable: true,
+  series: [
     {
-      name:'访问来源',
-      type:'pie',
-      radius : '75%',
-      center: ['50%', '50%'],
-      data:[
-        { name:'直接访问',value:70},
-        {value:30, name:'邮件营销'},
-      ]
-    }
-  ]
+      name: "访问来源",
+      type: "pie",
+      radius: "75%",
+      center: ["50%", "50%"],
+      data: [
+        { name: "直接访问", value: 70 },
+        { value: 30, name: "邮件营销" },
+      ],
+    },
+  ],
 };
 
 const chart = ref<any>("");
 watch?.(
-    () => props.list,
-    (newVal) => {
-      options.series[0].data = props.list
-      options.legend.data = []
-      props.list.forEach(item=>{
-        options.legend.data.push(item.name)
-      })
-      handle()
-    }
+  () => props.list,
+  (newVal) => {
+    options.series[0].data = props.list;
+    options.legend.data = [];
+    props.list.forEach((item) => {
+      options.legend.data.push(item.name);
+    });
+    handle();
+  }
 );
 
-const handle=()=>{
+const handle = () => {
   chart.value = markRaw(
-      echarts.init(document.getElementById(props.id) as HTMLDivElement)
+    echarts.init(document.getElementById(props.id) as HTMLDivElement)
   );
 
   chart.value.setOption(options);
@@ -86,7 +89,7 @@ const handle=()=>{
   window.addEventListener("resize", () => {
     chart.value.resize();
   });
-}
+};
 onMounted(() => {
   handle();
 });

+ 39 - 36
src/views/report/statistics/outTime/components/PieChart3.vue

@@ -7,7 +7,7 @@
 
 <script setup lang="ts">
 import * as echarts from "echarts";
-import {defineProps, ref} from "vue";
+import { defineProps, ref } from "vue";
 
 const props = defineProps({
   id: {
@@ -31,54 +31,57 @@ const props = defineProps({
   list: {
     type: Array,
     default: [],
-    required: true
-  }
+    required: true,
+  },
 });
 const options = {
-  title : {
-    text: '超期原因分析',
-    x:'center'
+  title: {
+    text: "超期原因分析",
+    x: "center",
+    textStyle: {
+      color: "#fff",
+    },
   },
-  tooltip : {
-    trigger: 'item',
-    formatter: "{b} : {c} ({d}%)"
+  tooltip: {
+    trigger: "item",
+    formatter: "{b} : {c} ({d}%)",
   },
   legend: {
-    orient : 'vertical',
-    x : 'left',
-    data:['直接访问','邮件营销','联盟广告','视频广告','搜索引擎']
+    orient: "vertical",
+    x: "left",
+    data: ["直接访问", "邮件营销", "联盟广告", "视频广告", "搜索引擎"],
   },
-  calculable : true,
-  series : [
+  calculable: true,
+  series: [
     {
-      name:'访问来源',
-      type:'pie',
-      radius : '75%',
-      center: ['50%', '50%'],
-      data:[
-        { name:'直接访问',value:70},
-        {value:30, name:'邮件营销'},
-      ]
-    }
-  ]
+      name: "访问来源",
+      type: "pie",
+      radius: "75%",
+      center: ["50%", "50%"],
+      data: [
+        { name: "直接访问", value: 70 },
+        { value: 30, name: "邮件营销" },
+      ],
+    },
+  ],
 };
 
 const chart = ref<any>("");
 watch?.(
-    () => props.list,
-    (newVal) => {
-      options.series[0].data = props.list
-      options.legend.data = []
-      props.list.forEach(item=>{
-        options.legend.data.push(item.name)
-      })
-      handle()
-    }
+  () => props.list,
+  (newVal) => {
+    options.series[0].data = props.list;
+    options.legend.data = [];
+    props.list.forEach((item) => {
+      options.legend.data.push(item.name);
+    });
+    handle();
+  }
 );
 
-const handle=()=>{
+const handle = () => {
   chart.value = markRaw(
-      echarts.init(document.getElementById(props.id) as HTMLDivElement)
+    echarts.init(document.getElementById(props.id) as HTMLDivElement)
   );
 
   chart.value.setOption(options);
@@ -86,7 +89,7 @@ const handle=()=>{
   window.addEventListener("resize", () => {
     chart.value.resize();
   });
-}
+};
 onMounted(() => {
   handle();
 });

+ 4 - 0
src/views/report/statistics/stationbeat/index.vue

@@ -197,6 +197,10 @@ const clickSearch = async () => {
   setOption();
   charts.value.setOption(
     {
+      darkMode: true,
+      textStyle: {
+        color: "#fff",
+      },
       tooltip: {
         trigger: "axis",
         axisPointer: {

+ 12 - 0
src/views/report/statistics/workeveryday/index.vue

@@ -104,8 +104,14 @@ const labelOption = {
 };
 
 const echartOption1 = ref({
+  textStyle: {
+    color: "#fff",
+  },
   title: {
     text: "工序完成数量",
+    textStyle: {
+      color: "#fff",
+    },
   },
   tooltip: {
     trigger: "axis",
@@ -144,8 +150,14 @@ const echartOption1 = ref({
   ],
 });
 const echartOption2 = ref({
+  textStyle: {
+    color: "#fff",
+  },
   title: {
     text: "生产趋势图",
+    textStyle: {
+      color: "#fff",
+    },
   },
   tooltip: {
     trigger: "axis",

+ 3 - 0
src/views/report/workhourinfo/prodthours/index.vue

@@ -183,6 +183,9 @@ const clickSearch = async () => {
   setOption();
   charts.value.setOption(
     {
+      textStyle: {
+        color: "#fff",
+      },
       tooltip: {
         trigger: "axis",
         axisPointer: {