Преглед изворни кода

Merge branch 'xf_dev' of http://maven.jgiot.com:7012/jiaxiaoqiang/JG-ADMIN-TEMP into xf_dev

jiaxiaoqiang пре 1 година
родитељ
комит
50164e6789

+ 1 - 1
.env.development

@@ -12,7 +12,7 @@ VITE_APP_UPLOAD_URL = 'http://192.168.101.4:9000'
 # 开发接口地址
 # VITE_APP_API_URL = 'http://192.168.101.4:8078'
 #VITE_APP_API_URL = 'http://192.168.101.188:8078'
- VITE_APP_API_URL = 'http://192.168.101.4:8078'  #lup
+ VITE_APP_API_URL = 'http://192.168.101.188:8078'  #lup
 #VITE_APP_API_URL = 'http://192.168.101.64:8078'  #hetao
 
 # 是否启用 Mock 服务

+ 1 - 0
.gitignore

@@ -16,3 +16,4 @@ dist-ssr
 package-lock.json
 pnpm-lock.yaml
 stats.html
+/docker/.run

+ 296 - 291
src/views/base/craftManagement/route/bindProcess.vue

@@ -13,44 +13,47 @@
           :icon="Document"
           size="small"
           @click="saveFlow"
-          >保存</el-button
+        >保存</el-button
         >
       </el-space>
     </div>
     <div class="binContainer">
       <div class="processTree">
-        <el-collapse v-model="activeNames">
-          <el-collapse-item
-            v-for="(pProcess, pIndex) in list1"
-            :key="pProcess.workSection"
-            :name="pIndex"
-          >
-            <template #title>
-              <div class="title2">
-                {{ getNameByDictType(pProcess.workSection) }}
-              </div>
-            </template>
-            <div class="treeChild">
-              <VueDraggable
-                v-model="pProcess.baseOperationList"
-                :animation="150"
-                :group="{ name: 'people', pull: 'clone', put: false }"
-                :sort="false"
-                :clone="clone"
-              >
-                <div
-                  class="childItem"
-                  v-for="(item, index) in pProcess?.baseOperationList"
-                  :key="item.id"
-                >
-                  {{ item.operationName }}
+        <el-scrollbar >
+          <el-collapse v-model="activeNames">
+            <el-collapse-item
+              v-for="(pProcess, pIndex) in list1"
+              :key="pProcess.workSection"
+              :name="pIndex"
+            >
+              <template #title>
+                <div class="title2">
+                  {{ getNameByDictType(pProcess.workSection) }}
                 </div>
-              </VueDraggable>
-            </div>
-          </el-collapse-item>
-        </el-collapse>
+              </template>
+              <div class="treeChild">
+                <VueDraggable
+                  v-model="pProcess.baseOperationList"
+                  :animation="150"
+                  :group="{ name: 'people', pull: 'clone', put: false }"
+                  :sort="false"
+                  :clone="clone"
+                >
+                  <div
+                    class="childItem"
+                    v-for="(item, index) in pProcess?.baseOperationList"
+                    :key="item.id"
+                  >
+                    {{ item.operationName }}
+                  </div>
+                </VueDraggable>
+              </div>
+            </el-collapse-item>
+          </el-collapse>
+        </el-scrollbar>
       </div>
       <div class="flowBox">
+        <el-scrollbar style="padding-bottom: 20px;">
         <VueDraggable
           v-model="list2"
           :animation="150"
@@ -75,6 +78,7 @@
             <Bottom class="arrow" v-show="index < list2.length - 1" />
           </div>
         </VueDraggable>
+      </el-scrollbar>
       </div>
       <div class="detailInfo">
         <div v-if="selectIndex > -1 && !isChanged">
@@ -86,7 +90,7 @@
           />
           <div class="editProcces">
             <el-button type="primary" :icon="Grid" @click="editProComponent"
-              >编辑工序组件</el-button
+            >编辑工序组件</el-button
             >
           </div>
         </div>
@@ -96,309 +100,310 @@
   </div>
 </template>
 <script setup>
-import {
-  Back,
-  Download,
-  Document,
-  Delete,
-  Bottom,
-  Grid,
-} from "@element-plus/icons-vue";
-import { VueDraggable } from "vue-draggable-plus";
-import { processTreeList } from "@/api/craft/process/index";
-import { useCommonStoreHook, useDictionaryStore } from "@/store";
-import {
-  processesByRouteId,
-  saveProcessInRoute,
-  updateProcess,
-} from "@/api/craft/route/index";
-import { v4 as uuidv4 } from "uuid";
-import { formOption } from "./bindConfig";
-import { ElMessage } from "element-plus";
+  import {
+    Back,
+    Download,
+    Document,
+    Delete,
+    Bottom,
+    Grid,
+  } from "@element-plus/icons-vue";
+  import { VueDraggable } from "vue-draggable-plus";
+  import { processTreeList } from "@/api/craft/process/index";
+  import { useCommonStoreHook, useDictionaryStore } from "@/store";
+  import {
+    processesByRouteId,
+    saveProcessInRoute,
+    updateProcess,
+  } from "@/api/craft/route/index";
+  import { v4 as uuidv4 } from "uuid";
+  import { formOption } from "./bindConfig";
+  import { ElMessage } from "element-plus";
 
-const router = useRouter();
-const route = useRoute();
+  const router = useRouter();
+  const route = useRoute();
 
-// 数据字典相关
-const { dicts } = useDictionaryStore();
+  // 数据字典相关
+  const { dicts } = useDictionaryStore();
 
-// 顶部====================
-const back = () => {
-  router.back();
-};
+  // 顶部====================
+  const back = () => {
+    router.back();
+  };
 
-const download = () => {};
+  const download = () => {};
 
-// 左侧工序树====================
-const activeNames = ref([0]);
-const handleChange = (val) => {};
+  // 左侧工序树====================
+  const activeNames = ref([0]);
+  const handleChange = (val) => {};
 
-const list1 = ref([]);
+  const list1 = ref([]);
 
-// 由于工序和(工序-工艺)模型字段不同,需要自定义克隆
-const clone = (origin) => {
-  const data = JSON.parse(JSON.stringify(origin));
-  return {
-    created: "",
-    creator: "",
-    deleted: 0,
-    deptId: "",
-    id: null,
-    uuid: uuidv4(),
-    nextOperationId: "", //下一工序id
-    operationId: "", //	当前工序id
-    operationSort: 0, //当前工序排序号
-    operationVO: data,
-    orgId: "",
-    processRouteId: route.params.id, //工艺路线id
-    updated: "",
-    updator: "",
-    virtualCode: "",
+  // 由于工序和(工序-工艺)模型字段不同,需要自定义克隆
+  const clone = (origin) => {
+    const data = JSON.parse(JSON.stringify(origin));
+    return {
+      created: "",
+      creator: "",
+      deleted: 0,
+      deptId: "",
+      id: null,
+      uuid: uuidv4(),
+      nextOperationId: "", //下一工序id
+      operationId: "", //	当前工序id
+      operationSort: 0, //当前工序排序号
+      operationVO: data,
+      orgId: "",
+      processRouteId: route.params.id, //工艺路线id
+      updated: "",
+      updator: "",
+      virtualCode: "",
+    };
   };
-};
 
-// 保存中间的工序列表
-const saveFlow = async () => {
-  for (let i = 0; i < list2.value.length; i++) {
-    list2.value[i].operationSort = i;
-    list2.value[i].operationId = list2.value[i]?.operationVO?.id;
-    list2.value[i].operation = list2.value[i]?.operationVO; //后端入参和返回不一样,在这里处理一下。
-    if (i === list2.value.length - 1) {
-      list2.value[i].nextOperationId = null;
-    } else {
-      list2.value[i].nextOperationId = list2.value[i + 1]?.operationVO?.id;
+  // 保存中间的工序列表
+  const saveFlow = async () => {
+    for (let i = 0; i < list2.value.length; i++) {
+      list2.value[i].operationSort = i;
+      list2.value[i].operationId = list2.value[i]?.operationVO?.id;
+      list2.value[i].operation = list2.value[i]?.operationVO; //后端入参和返回不一样,在这里处理一下。
+      if (i === list2.value.length - 1) {
+        list2.value[i].nextOperationId = null;
+      } else {
+        list2.value[i].nextOperationId = list2.value[i + 1]?.operationVO?.id;
+      }
     }
-  }
-  let p = {
-    processRouteId: route.params.id,
-    routeOpList: list2.value,
+    let p = {
+      processRouteId: route.params.id,
+      routeOpList: list2.value,
+    };
+    let res = await saveProcessInRoute(p);
+    // Elmessage.success("保存成功");
+    loadProcessesFlow();
   };
-  let res = await saveProcessInRoute(p);
-  // Elmessage.success("保存成功");
-  loadProcessesFlow();
-};
 
-const loadTreeData = () => {
-  processTreeList().then((res) => {
-    list1.value = res.data ?? [];
-  });
-};
-
-// 中间列表====================
-const list2 = ref([]);
-const selectIndex = ref(-1);
-const isChanged = ref(true); //如果中间列表发生了改变则不显示右侧信息
-// 点击中间列表事件,需要设置index和值
-const clickFlowItem = (item, index) => {
-  if (isChanged.value) {
-    ElMessage.warning("请先保存工序列表");
-    return;
-  }
-  selectIndex.value = index;
-  currentProcess.value = item.operationVO;
-};
+  const loadTreeData = () => {
+    processTreeList().then((res) => {
+      list1.value = res.data ?? [];
+    });
+  };
 
-const clickDelete = (index) => {
-  list2.value.splice(index, 1);
-  onUpdate();
-};
+  // 中间列表====================
+  const list2 = ref([]);
+  const selectIndex = ref(-1);
+  const isChanged = ref(true); //如果中间列表发生了改变则不显示右侧信息
+  // 点击中间列表事件,需要设置index和值
+  const clickFlowItem = (item, index) => {
+    if (isChanged.value) {
+      ElMessage.warning("请先保存工序列表");
+      return;
+    }
+    selectIndex.value = index;
+    currentProcess.value = item.operationVO;
+  };
 
-const onClone = () => {
-  isChanged.value = true;
-  tipContent.value = "请先保存工序列表,再选择工序进行编辑";
-};
+  const clickDelete = (index) => {
+    list2.value.splice(index, 1);
+    onUpdate();
+  };
 
-const onUpdate = () => {
-  //   中间发生了改变调用
-  selectIndex.value = -1;
-  isChanged.value = true;
-  tipContent.value = "请先保存工序列表,再选择工序进行编辑";
-};
+  const onClone = () => {
+    isChanged.value = true;
+    tipContent.value = "请先保存工序列表,再选择工序进行编辑";
+  };
 
-const getFlowNameClass = (index) => {
-  return index === selectIndex.value ? "nameLabelSelect" : "nameLabelCommon";
-};
+  const onUpdate = () => {
+    //   中间发生了改变调用
+    selectIndex.value = -1;
+    isChanged.value = true;
+    tipContent.value = "请先保存工序列表,再选择工序进行编辑";
+  };
 
-const loadProcessesFlow = async () => {
-  const res = await processesByRouteId(route.params.id);
+  const getFlowNameClass = (index) => {
+    return index === selectIndex.value ? "nameLabelSelect" : "nameLabelCommon";
+  };
 
-  list2.value = res.data ?? [];
-  isChanged.value = false;
-  tipContent.value = "请选择需要编辑的工序";
-};
+  const loadProcessesFlow = async () => {
+    const res = await processesByRouteId(route.params.id);
 
-// 右侧具体信息====================
-const formRef = ref(null);
-const currentProcess = ref({});
-const tipContent = ref("");
-const handleSubmit = () => {};
+    list2.value = res.data ?? [];
+    isChanged.value = false;
+    tipContent.value = "请选择需要编辑的工序";
+  };
 
-const editProComponent = async () => {
-  // saveFlow();
-  let res = await updateProcess(currentProcess.value);
-  ElMessage.success("保存成功");
-  router.push({
-    path: `/base/craftManagement/processCom/${currentProcess.value.id}`,
-    query: { prodtCode: route.query.prodtCode, routeId: route.query.routeId },
-  });
-};
+  // 右侧具体信息====================
+  const formRef = ref(null);
+  const currentProcess = ref({});
+  const tipContent = ref("");
+  const handleSubmit = () => {};
 
-// 全局=======
+  const editProComponent = async () => {
+    // saveFlow();
+    let res = await updateProcess(currentProcess.value);
+    ElMessage.success("保存成功");
+    router.push({
+      path: `/base/craftManagement/processCom/${currentProcess.value.id}`,
+      query: { prodtCode: route.query.prodtCode, routeId: route.query.routeId },
+    });
+  };
 
-onMounted(() => {
-  loadTreeData();
-  loadProcessesFlow();
-});
+  // 全局=======
 
-const getNameByDictType = (dictValue) => {
-  let str = "";
-  dicts?.workshop_section?.forEach((element) => {
-    if (element?.dictValue === dictValue) {
-      str = element?.dictLabel ?? "===";
-    }
+  onMounted(() => {
+    loadTreeData();
+    loadProcessesFlow();
   });
-  return str;
-};
+
+  const getNameByDictType = (dictValue) => {
+    let str = "";
+    dicts?.workshop_section?.forEach((element) => {
+      if (element?.dictValue === dictValue) {
+        str = element?.dictLabel ?? "===";
+      }
+    });
+    return str;
+  };
 </script>
 
 <style lang="scss" scoped>
-.binContainer {
-  height: calc(100vh - 165px);
-  background-color: #f5f7f9;
-  overflow-y: scroll;
-  // background-color: white;
-  padding: 0;
-  display: flex;
-}
-
-.header {
-  height: 50px;
-  display: flex;
-  background-color: #f5f7f9;
-  justify-content: space-between;
-  align-items: center;
-  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
-}
-
-.processTree {
-  width: 220px;
-  height: 100%;
-  border-right: 1px solid rgba(0, 0, 0, 0.1);
-  .treeChild {
-    background: #f2f2f2;
-    padding: 20px 8px 10px 8px;
-    .childItem {
-      width: 100%;
-      height: 28px;
-      background: #ffffff;
-      border-radius: 4px 4px 4px 4px;
-      border: 1px solid rgba(35, 32, 50, 0.1);
-      margin-bottom: 10px;
-      text-align: center;
-    }
+  .binContainer {
+    height: calc(100vh - 165px);
+    background-color: #f5f7f9;
+    overflow-y: scroll;
+    // background-color: white;
+    padding: 0;
+    display: flex;
   }
-}
-
-.flowBox {
-  flex: 1;
-  display: flex;
-  justify-content: center;
-  overflow-y: auto;
-  padding-top: 47px;
-  .flowContain {
-    width: 400px;
 
-    min-height: 200px;
-  }
-  .flowItem {
+  .header {
     height: 50px;
-    width: 400px;
-    margin-bottom: 20px;
     display: flex;
+    background-color: #f5f7f9;
     justify-content: space-between;
-    position: relative;
-    .indexLabel {
-      line-height: 50px;
-
-      font-size: 14px;
-      color: #6e7993;
+    align-items: center;
+    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
+  }
 
-      text-align: left;
+  .processTree {
+    width: 220px;
+    height: 100%;
+    border-right: 1px solid rgba(0, 0, 0, 0.1);
+    .treeChild {
+      background: #f2f2f2;
+      padding: 20px 8px 10px 8px;
+      .childItem {
+        width: 100%;
+        height: 28px;
+        background: #ffffff;
+        border-radius: 4px 4px 4px 4px;
+        border: 1px solid rgba(35, 32, 50, 0.1);
+        margin-bottom: 10px;
+        text-align: center;
+      }
     }
-    .nameLabelCommon {
-      width: 299px;
-      line-height: 50px;
-      background: #ffffff;
-      box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.5);
-      border-radius: 4px 4px 4px 4px;
-      border: 1px solid #232032;
-      text-align: center;
-    }
-    .nameLabelSelect {
-      width: 299px;
-      line-height: 50px;
-      background: rgba(10, 89, 247, 0.2);
-      box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.5);
-      border-radius: 4px 4px 4px 4px;
-      border: 2px solid #0a59f7;
-      text-align: center;
+  }
+
+  .flowBox {
+    flex: 1;
+    display: flex;
+    justify-content: center;
+    overflow-y: auto;
+    padding-top: 47px;
+    padding-bottom: 47px;
+    .flowContain {
+      width: 400px;
+
+      min-height: 200px;
     }
-    .flowDelete {
-      width: 1em;
-      height: 1em;
-      color: red;
-      visibility: hidden;
+    .flowItem {
+      height: 50px;
+      width: 400px;
+      margin-bottom: 20px;
+      display: flex;
+      justify-content: space-between;
+      position: relative;
+      .indexLabel {
+        line-height: 50px;
+
+        font-size: 14px;
+        color: #6e7993;
+
+        text-align: left;
+      }
+      .nameLabelCommon {
+        width: 299px;
+        line-height: 50px;
+        background: #ffffff;
+        box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.5);
+        border-radius: 4px 4px 4px 4px;
+        border: 1px solid #232032;
+        text-align: center;
+      }
+      .nameLabelSelect {
+        width: 299px;
+        line-height: 50px;
+        background: rgba(10, 89, 247, 0.2);
+        box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.5);
+        border-radius: 4px 4px 4px 4px;
+        border: 2px solid #0a59f7;
+        text-align: center;
+      }
+      .flowDelete {
+        width: 1em;
+        height: 1em;
+        color: red;
+        visibility: hidden;
+      }
+      .arrow {
+        position: absolute;
+        width: 10px;
+        height: 18px;
+        top: 50px;
+        left: 50%;
+      }
     }
-    .arrow {
-      position: absolute;
-      width: 10px;
-      height: 18px;
-      top: 50px;
-      left: 50%;
+    .flowItem:hover {
+      .flowDelete {
+        visibility: visible;
+      }
     }
   }
-  .flowItem:hover {
-    .flowDelete {
-      visibility: visible;
+
+  .detailInfo {
+    width: 320px;
+    height: 100%;
+    border-left: 1px solid rgba(0, 0, 0, 0.1);
+    .editProcces {
+      display: flex;
+      justify-content: center;
+      margin-top: 15px;
     }
   }
-}
 
-.detailInfo {
-  width: 320px;
-  height: 100%;
-  border-left: 1px solid rgba(0, 0, 0, 0.1);
-  .editProcces {
-    display: flex;
-    justify-content: center;
-    margin-top: 15px;
+  .title {
+    line-height: 44px;
+    color: #6f7991;
+    font-size: 14px;
+    font-weight: bold;
+    text-align: left;
+    margin-left: 20px;
+  }
+  .title2 {
+    color: #232032;
+    font-size: 14px;
+    text-align: left;
+    margin-left: 19px;
+  }
+  .tipContent {
+    width: 100%;
+    text-align: center;
+    margin-top: 20px;
+    color: #e6a23c;
   }
-}
-
-.title {
-  line-height: 44px;
-  color: #6f7991;
-  font-size: 14px;
-  font-weight: bold;
-  text-align: left;
-  margin-left: 20px;
-}
-.title2 {
-  color: #232032;
-  font-size: 14px;
-  text-align: left;
-  margin-left: 19px;
-}
-.tipContent {
-  width: 100%;
-  text-align: center;
-  margin-top: 20px;
-  color: #e6a23c;
-}
 </style>
 
 <style>
-.el-collapse-item__content {
-  padding: 0;
-}
+  .el-collapse-item__content {
+    padding: 0;
+  }
 </style>

+ 6 - 6
src/views/device/data/index.vue

@@ -60,17 +60,17 @@ const searchPage = (params, done) =>{
         props: { label: "deviceName", value: "deviceNo", },
       },
         {
-          label: "任务编号",
+          label: "任务信息",
           prop: "taskNo",
           search: true,
           hide: true,
         },
-        {
+        /*{
           label: "序列号",
           prop: "seqNo",
           search: true,
           hide: true,
-        },
+        },*/
         {
           label: "采集时间",
           prop: "ts",
@@ -123,17 +123,17 @@ option.value = Object.assign(option.value, {
     props: { label: "deviceName", value: "deviceNo", },
   },
     {
-      label: "任务编号",
+      label: "任务信息",
       prop: "taskNo",
       search: true,
       hide: true,
     },
-    {
+   /* {
       label: "序列号",
       prop: "seqNo",
       search: true,
       hide: true,
-    },
+    },*/
     {
       label: "采集时间",
       prop: "ts",

+ 26 - 4
src/views/report/statistics/outputstatistics/index.vue

@@ -1,9 +1,31 @@
 <template>
   <div class="mainContentBox">
-    <avue-crud ref="crudRef1" v-model:search="data1.search" :data="data1.data" :option="data1.option"
-      v-model:page="data1.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" />
+    <avue-crud
+      ref="crudRef1"
+      v-model:search="data1.search"
+      :data="data1.data"
+      :option="data1.option"
+      v-model:page="data1.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 #menu-right="{}">
+        <el-button
+          class="ml-3"
+          @click="
+            data1.Utils.exportData('/api/v1/process/census/outputInfo/export')
+          "
+        >
+          <template #icon> <i-ep-download /> </template>导出
+        </el-button>
+      </template>
+    </avue-crud>
   </div>
 </template>
 <script setup>

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

@@ -1,27 +1,51 @@
 <template>
   <div class="mainContentBox">
-    <avue-crud ref="crudRef1" v-model:search="data1.search" :data="data1.data" :option="data1.option"
-      v-model:page="data1.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">
+    <avue-crud
+      ref="crudRef1"
+      v-model:search="data1.search"
+      :data="data1.data"
+      :option="data1.option"
+      v-model:page="data1.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 #menu="{ row, index, type }">
-        <el-button @click="ckickCell(row)" icon="el-icon-view" text type="primary">查看</el-button>
+        <el-button
+          @click="ckickCell(row)"
+          icon="el-icon-view"
+          text
+          type="primary"
+          >查看</el-button
+        >
       </template>
       <template #header="">
         <div id="dailystoragecharts"></div>
       </template>
       <template #menu-right="{}">
-        <el-button class="ml-3" @click="
-          data1.Utils.exportData(
-            '/api/v1/process/census/abnormalOperation/export'
-          )
-          ">
+        <el-button
+          class="ml-3"
+          @click="
+            data1.Utils.exportData(
+              '/api/v1/process/census/completeOrder/export'
+            )
+          "
+        >
           <template #icon> <i-ep-download /> </template>导出
         </el-button>
       </template>
     </avue-crud>
-    <el-dialog v-model="editDialog.visible" :title="editDialog.title" width="1200px"
-      @close="editDialog.visible = false">
+    <el-dialog
+      v-model="editDialog.visible"
+      :title="editDialog.title"
+      width="1200px"
+      @close="editDialog.visible = false"
+    >
       <div class="mainContentBox">
         <div id="dailystoragecharts2"></div>
       </div>