pengwei
2025-03-27 1288a7890deb3b180b1e8df7015b1036514c4e71
3.27优化
已修改7个文件
233 ■■■■ 文件已修改
项目代码/client/dist.7z 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/views/system/UserInfo.vue 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/views/tts/BasicInformation/Basicinformation.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/views/tts/DataLogging/Datalogging.vue 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/views/tts/TaskManagement/Taskmanagement.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/views/tts/TheCurrentJob/Startjob.vue 122 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/views/tts/UserManagement/Usermanagement.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/client/dist.7z
Binary files differ
ÏîÄ¿´úÂë/client/src/views/system/UserInfo.vue
@@ -11,7 +11,7 @@
        >
          <el-image
            style="width: 100px; height: 100px"
            :src="'http://192.168.0.80:5000' + userInfo.headImageUrl"
            :src="'http://115.159.85.185:9098' + userInfo.headImageUrl"
            :fit="fit"
          />
          <!-- <img
@@ -327,11 +327,37 @@
  if (!formEl) return;
  await formEl.validate((valid, fields) => {
    if (valid) {
      if (
        Passwordform.value.newPwd == "" ||
        Passwordform.value.oldPwd == "" ||
        newPwd.value == ""
      ) {
        ElMessage({
          message: "输入框不能为空",
          type: "warning",
        });
        return;
      }
      if (Passwordform.value.newPwd == Passwordform.value.oldPwd) {
        ElMessage({
          message: "两次密码一致",
          type: "warning",
        });
        return;
      }
      if (Passwordform.value.newPwd != newPwd.value) {
        ElMessage({
          message: "新密码不一致",
          type: "warning",
        });
        return;
      }
      UpdatePassword(Passwordform.value).then((res) => {
        ElMessage({
          message: "修改成功",
          type: "success",
        });
        dialogVisible.value = false;
        console.log(res);
      });
    } else {
@@ -359,7 +385,6 @@
  upload.value.handleRemove(file);
};
const onSubmit = () => {
  if (form.value.files == "") {
    ElMessage({ message: "图片不能为空", type: "warning" });
    return;
ÏîÄ¿´úÂë/client/src/views/tts/BasicInformation/Basicinformation.vue
@@ -106,7 +106,8 @@
            ><el-icon style="margin-right: 0.2rem"> <Plus /> </el-icon
            >新建</el-button
          >
          <!-- <el-button
          <el-button
            @click="importDialogVisible = true"
            size="small"
            style="width: 5.5rem; height: 2rem; font-size: 0.88rem"
            >批量导入</el-button
@@ -116,7 +117,7 @@
            style="width: 5.5rem; height: 2rem; font-size: 0.88rem"
            @click="printExcel"
            >批量导出</el-button
          > -->
          >
          <el-button
            @click="deleteAll"
            size="small"
@@ -482,12 +483,27 @@
        </div>
      </template>
    </el-dialog>
    <el-dialog v-model="importDialogVisible">
      <UploadExcel
        @importExcelAfter="importExcelAfter"
        :url="isactive == 1 ? 'api/ArticleInfom/Import' : 'api/Tools/Import'"
        :template="{
          url:
            isactive == 1
              ? 'api/ArticleInfom/DownLoadTemplate'
              : 'api/Tools/DownLoadTemplate',
          fileName: isactive == 1 ? '信息导入模板' : '工具导入模板',
        }"
      />
    </el-dialog>
  </div>
</template>
<script setup>
import { ref, reactive, onMounted, toRef } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import { formatTime } from "@/utils/index.js";
import UploadExcel from "@/components/basic/UploadExcel.vue";
import {
  getBasicinformation,
  addBasicinformation,
@@ -515,7 +531,7 @@
const isactive = ref(1);
const dialogVisible = ref(false);
const dialogVisible1 = ref(false);
const importDialogVisible = ref(false); // å¯¼å…¥
const selectoptions = ref([]);
const infoOpitions = ref([
  {
ÏîÄ¿´úÂë/client/src/views/tts/DataLogging/Datalogging.vue
@@ -1,7 +1,10 @@
<template>
  <div class="Datalogging">
    <div class="content">
      <div class="checkbox">
      <div
        class="checkbox"
        :style="{ width: roleINFO == 1 ? '16rem' : '11rem' }"
      >
        <div
          :class="['item', isactive == 1 ? 'isactive' : '']"
          @click="changeactive(1)"
@@ -15,6 +18,7 @@
          ä½œä¸šå•记录
        </div>
        <div
          v-if="roleINFO == 1"
          :class="['item', isactive == 3 ? 'isactive' : '']"
          @click="changeactive(3)"
        >
@@ -849,7 +853,9 @@
            >
              <span style="width: 6rem; text-align: right; display: block"
                >任务名称:</span
              ><span>{{ pesonData[0].takename }}</span>
              ><span>{{
                pesonData.length != 0 ? pesonData[0].takename : ""
              }}</span>
            </div>
            <div
              style="
@@ -861,7 +867,9 @@
            >
              <span style="width: 6rem; text-align: right; display: block"
                >技术员:</span
              ><span>{{ pesonData[0].jishuyuan }}</span>
              ><span>{{
                pesonData.length != 0 ? pesonData[0].jishuyuan : ""
              }}</span>
            </div>
            <div
              style="
@@ -873,7 +881,9 @@
            >
              <span style="width: 6rem; text-align: right; display: block"
                >检修工长:</span
              ><span>{{ pesonData[0].gonzhang }}</span>
              ><span>{{
                pesonData.length != 0 ? pesonData[0].gonzhang : ""
              }}</span>
            </div>
            <div
              style="
@@ -885,7 +895,9 @@
            >
              <span style="width: 6rem; text-align: right; display: block"
                >质检员:</span
              ><span>{{ pesonData[0].zhijianyuan }}</span>
              ><span>{{
                pesonData.length != 0 ? pesonData[0].zhijianyuan : ""
              }}</span>
            </div>
            <div
              style="
@@ -897,7 +909,9 @@
            >
              <span style="width: 6rem; text-align: right; display: block"
                >力矩作业员:</span
              ><span>{{ pesonData[0].lijuzouyeyuan }}</span>
              ><span>{{
                pesonData.length != 0 ? pesonData[0].lijuzouyeyuan : ""
              }}</span>
            </div>
            <div
              style="
@@ -909,7 +923,9 @@
            >
              <span style="width: 6rem; text-align: right; display: block"
                >辅助员:</span
              ><span>{{ pesonData[0].fuzyuan }}</span>
              ><span>{{
                pesonData.length != 0 ? pesonData[0].fuzyuan : ""
              }}</span>
            </div>
            <div
              style="
@@ -1158,6 +1174,8 @@
    ],
  }).then((res) => {
    pesonData.value = res.rows;
    console.log(res.rows);
    TorquedialogVisible.value = true;
  });
};
@@ -1469,7 +1487,7 @@
const roleINFO = ref();
onMounted(() => {
  initData();
  roleINFO.value = JSON.parse(localStorage.getItem("user"));
  roleINFO.value = JSON.parse(localStorage.getItem("user")).roleId;
  console.log(roleINFO.value);
});
</script>
ÏîÄ¿´úÂë/client/src/views/tts/TaskManagement/Taskmanagement.vue
@@ -142,6 +142,12 @@
        >
          <el-table-column type="selection" align="center" min-width="1%" />
          <el-table-column
            prop="takeName"
            label="任务名称"
            align="center"
            min-width="2%"
          />
          <el-table-column
            prop="trainKind"
            label="车型"
            align="center"
ÏîÄ¿´úÂë/client/src/views/tts/TheCurrentJob/Startjob.vue
@@ -171,7 +171,7 @@
              >
            </span>
          </div>
          <div style="position: absolute; width: 47rem; height: 2.5rem">
          <div style="position: absolute; width: 62rem; height: 2.5rem">
            <el-table
              empty-text="暂无数据"
              style="margin-top: 0.88rem"
@@ -191,7 +191,7 @@
              <el-table-column
                property="craftsStep"
                label="工艺项点/步骤"
                min-width="30%"
                min-width="13%"
              >
                <template #default="scope">
                  <span
@@ -205,16 +205,41 @@
                    "
                    >{{ scope.row.craftsStep }}
                  </span></template
                ></el-table-column
              >
                >
              </el-table-column>
              <el-table-column
                property="craftContent"
                label="工艺内容"
                min-width="70%"
                min-width="40%"
              >
                <template #default="scope">
                  <el-tooltip placement="bottom" effect="light">
                    <template #content>
                      <span style="display: block; width: 15rem">{{
                        scope.row.craftContent
                      }}</span>
                    </template>
                    <span
                      @click="true"
                      style="
                        color: #ffffff;
                        font-size: 0.88rem;
                        display: -webkit-box; /* è®¾ç½®ä¸ºWebKit内核的弹性盒子模型 */
                        -webkit-box-orient: vertical; /* åž‚直排列 */
                        -webkit-line-clamp: 2; /* é™åˆ¶æ˜¾ç¤ºä¸¤è¡Œ */
                        overflow: hidden; /* éšè—è¶…出范围的内容 */
                        text-overflow: ellipsis; /* ä½¿ç”¨çœç•¥å· */
                      "
                      >{{ scope.row.craftContent }}</span
                    >
                  </el-tooltip>
                </template></el-table-column
              >
              <el-table-column property="tools" label="工具" min-width="12%">
                <template #default="scope">
                  <span
                    @click="true"
                    ref="spanHide"
                    style="
                      color: #ffffff;
                      font-size: 0.88rem;
@@ -224,12 +249,32 @@
                      overflow: hidden; /* éšè—è¶…出范围的内容 */
                      text-overflow: ellipsis; /* ä½¿ç”¨çœç•¥å· */
                    "
                    >{{ scope.row.craftContent }}</span
                    >{{ scope.row.tools }}
                  </span></template
                ></el-table-column
              >
              <el-table-column
                property="craftsStep"
                label="物料"
                min-width="15%"
              >
                <template #default="scope">
                  <span
                    style="
                      color: #ffffff;
                      font-size: 0.88rem;
                      display: -webkit-box; /* è®¾ç½®ä¸ºWebKit内核的弹性盒子模型 */
                      -webkit-box-orient: vertical; /* åž‚直排列 */
                      -webkit-line-clamp: 2; /* é™åˆ¶æ˜¾ç¤ºä¸¤è¡Œ */
                      overflow: hidden; /* éšè—è¶…出范围的内容 */
                      text-overflow: ellipsis; /* ä½¿ç”¨çœç•¥å· */
                    "
                    >{{ scope.row.material }}</span
                  ></template
                ></el-table-column
              >
            </el-table>
            <div class="consten" v-if="contentShow">
            <div class="consten" v-show="contentShow">
              <el-table
                empty-text="暂无数据"
                :data="gridData"
@@ -363,7 +408,7 @@
          justify-content: center;
          align-items: center;
          position: absolute;
          top: 35%;
          top: 38%;
          left: 50%;
          transform: translateX(-50%);
          z-index: 999;
@@ -419,7 +464,7 @@
        >
        <el-button
          :disabled="obj.setpNum == sunNUm"
          @click="Next(false)"
          @click="DialogVisible = true"
          type="primary"
          :style="{
            width: '5rem',
@@ -454,13 +499,30 @@
    <!-- å¼ºåˆ¶è·³è½¬ç¡®è®¤æ¡† -->
    <el-dialog v-model="centerDialogVisible" title="确认" width="300" center>
      <span> å½“前任务未完成,是否强制跳转到下一步? </span>
      <span sty> å½“前任务未完成,是否强制跳转到下一步? </span>
      <template #footer>
        <div class="dialog-footer">
          <el-button style="width: 5rem" @click="centerDialogVisible = false"
            >取消</el-button
          >
          <el-button style="width: 5rem" type="primary" @click="Next(true)">
            ç¡®è®¤
          </el-button>
        </div>
      </template>
    </el-dialog>
    <!-- æ˜¯å¦åˆæ ¼æˆ–已完成 -->
    <el-dialog v-model="DialogVisible" title="确认" width="300" center>
      <span style="display: block; text-align: center; font-size: 1.5rem">
        è¯·ç¡®è®¤å½“前步骤已完成且合格
      </span>
      <template #footer>
        <div class="dialog-footer">
          <el-button style="width: 5rem" @click="DialogVisible = false"
            >取消</el-button
          >
          <el-button style="width: 5rem" type="primary" @click="Next(false)">
            ç¡®è®¤
          </el-button>
        </div>
@@ -491,12 +553,11 @@
const container = ref(null);
// let scene, camera, renderer, controls;
const router = useRouter();
const gridData = ref([]);
const contentShow = ref(false);
const contentShow1 = ref(false);
const DialogVisible = ref(false);
const info = ref({});
info.value = history.state?.info ? JSON.parse(history.state?.info) : {};
const title = ref("");
@@ -507,7 +568,7 @@
const Torque = ref("");
const showDetail1 = (va1) => {
  contentShow1.value = false;
  contentShow.value = va1;
  contentShow.value = true;
};
const showDetail = (va1) => {
  contentShow1.value = va1;
@@ -591,11 +652,13 @@
      obj.value = res.data.nowdate[0];
      if (res.data.nowdate[0].setpNum == obj.value.setpNum) {
        centerDialogVisible.value = true;
        DialogVisible.value = false;
        return;
      }
      return;
    }
    centerDialogVisible.value = false;
    DialogVisible.value = false;
    gridData.value = [res.data.nex];
    xPos.value =
      gridData.value[0].pointAxisXYZ != null &&
@@ -631,7 +694,6 @@
  from.value.gruops = info.value.grouptype;
  from.value.id = info.value.njtakeid;
  from.value.creater = info.value.creater;
  console.log(from.value, info.value);
  ChangeStatus(from.value).then((res) => {
    ElMessage({
@@ -737,6 +799,7 @@
const BASE_COLOR = [0.2, 0.4, 0.6];
const RED_COLOR = [3.0, 0.2, 0.4];
const GREEN_COLOR = [0.0, 1.0, 0.0];
const xPos = ref("");
const yPos = ref("");
const zPos = ref("");
@@ -788,7 +851,6 @@
          material.needsUpdate = true; // å¼ºåˆ¶æ›´æ–°æè´¨
        });
      });
      console.log(part.split(","));
      if (
        part ==
        "抗蛇行减振器螺栓1,抗蛇行减振器螺栓2,抗蛇行减振器螺栓3,抗蛇行减振器螺栓4"
@@ -886,12 +948,12 @@
    []
  );
};
window.addEventListener("resize", () => {
  console.log("初始化场景", window.innerWidth, window.innerHeight);
  // camera.aspect = window.innerWidth / window.innerHeight;
  // camera.updateProjectionMatrix();
  // renderer.setSize(window.innerWidth, window.innerHeight);
});
// window.addEventListener("resize", () => {
//   // console.log("初始化场景", window.innerWidth, window.innerHeight);
//   // camera.aspect = window.innerWidth / window.innerHeight;
//   // camera.updateProjectionMatrix();
//   // renderer.setSize(window.innerWidth, window.innerHeight);
// });
const nodeList = [
  "转向架",
  "抗蛇行减振器螺栓1,抗蛇行减振器螺栓2,抗蛇行减振器螺栓3,抗蛇行减振器螺栓4",
@@ -990,7 +1052,7 @@
onMounted(() => {
  // åˆå§‹åŒ–场景
  renderer.setSize(window.innerWidth / 1.5, window.innerHeight / 2);
  renderer.setSize(window.innerWidth / 1.01, window.innerHeight / 2.1);
  renderer.setClearColor(0xeeeeee); // è®¾ç½®èƒŒæ™¯è‰²
  // å¯ç”¨ç‰©ç†æ¸²æŸ“模式
  // renderer.physicallyCorrectLights = true;
@@ -1000,6 +1062,12 @@
  // æ·»åŠ äº¤äº’æŽ§åˆ¶å™¨ï¼ˆé¼ æ ‡æ‹–æ‹½ç¼©æ”¾ï¼‰
  const controls = new OrbitControls(camera, renderer.domElement);
  controls.enablePan = false; //禁止右键拖拽
  //相机位置与观察目标点最小值
  controls.minDistance = 650;
  //相机位置与观察目标点最大值
  controls.maxDistance = 900;
  camera.position.set(...CAMERA_POS);
  controls.update();
@@ -1135,10 +1203,11 @@
      }
      .rect-item2 {
        width: 49.88rem;
        width: 65rem;
        height: 15.38rem;
        border: 0.1rem solid #02cde6;
        padding: 0.69rem 1.44rem;
        position: relative;
        .el-table :deep(.el-table__header th) {
          border: solid 1px #1ac0f6;
@@ -1146,8 +1215,9 @@
        }
        .consten {
          position: relative;
          top: 0;
          width: 100%;
          position: absolute;
          top: 10rem;
          z-index: 999;
        }
      }
ÏîÄ¿´úÂë/client/src/views/tts/UserManagement/Usermanagement.vue
@@ -425,11 +425,11 @@
                size="small"
              >
                <el-option
                  :disabled="item.value == 20"
                  :disabled="item.roleId == 1"
                  v-for="item in groupOptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                  :key="item.roleId"
                  :label="item.roleName"
                  :value="item.roleId"
                />
              </el-select>
            </el-form-item>
@@ -811,17 +811,11 @@
  { value: 1, label: "是" },
]);
//分组
const groupOptions = ref([
  { value: 20, label: "超级管理员" },
  { value: 21, label: "质检组" },
  { value: 22, label: "电气组" },
  { value: 23, label: "机械组" },
  { value: 24, label: "地沟组" },
]);
const groupOptions = ref([]);
const formUser = ref({
  user_Id: undefined,
  userName: "",
  role_Id: 21,
  role_Id: 2,
  roleName: "",
  phoneNo: "",
  remark: "",
@@ -988,6 +982,7 @@
    tableData.value = res.rows;
    pageTotal.value = res.total;
  });
  getRole();
};
//分页请求参数
const pageQuery = ref({
@@ -1258,6 +1253,7 @@
  GetPageDataApi({ ...pageQuery.value, filter }).then((res) => {
    grideData.value = res.rows;
    pageTotal.value = res.total;
    groupOptions.value = res.rows;
  });
};
//打印数据