pengwei
2025-03-21 34fd98222109dca47e8805d41895c3c37261258c
优化新增工艺
已修改7个文件
248 ■■■■■ 文件已修改
项目代码/client/dist.7z 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/api/newapi/Process.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/api/newapi/Thecurrentjob.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/utils/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/views/tts/CraftCenter/Craftcenter.vue 227 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/views/tts/TheCurrentJob/Startjob.vue 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
项目代码/client/src/views/tts/UserManagement/Usermanagement.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ÏîÄ¿´úÂë/client/dist.7z
Binary files differ
ÏîÄ¿´úÂë/client/src/api/newapi/Process.js
@@ -1,7 +1,7 @@
import http from "../http";
//工艺中心 æ­¥éª¤/套筒 æŽ¥å£
export const GetSleeveandStep = (data) => http.get(`api/Process/GetSleeveandStep?grops=${data}`)
export const GetSleeveandStep = (data) => http.get(`api/Process/GetSleeveandStep`)
//工艺明细  ç±»åˆ«
export const GetProcess = (data) => http.get(`api/Process/GetProcess?gruop=${data}`)
//工艺明细查询接口
ÏîÄ¿´úÂë/client/src/api/newapi/Thecurrentjob.js
@@ -28,4 +28,4 @@
export const GetTorque = (data) => http.post(`/api/TorqueOp/Checkvalue`, data)
//添加扭力值
export const AddTorque = (data) => http.post(`/api/TorqueOp/AddData`, data)
export const AddTorque = (data) => http.post(`/api/TorqueOp/AddTorqueOp`, data)
ÏîÄ¿´úÂë/client/src/utils/index.js
@@ -1,7 +1,7 @@
import { dayjs } from "element-plus";
// import XLSX from "xlsx"; //导入xlsx
export const baseUrl = "http://115.159.85.185:9098/"
export const baseUrl = "http://192.168.0.80:5000/"
// http://115.159.85.185:9091/
// http://192.168.0.80:5000/
// 115.159.85.185:9091
ÏîÄ¿´úÂë/client/src/views/tts/CraftCenter/Craftcenter.vue
@@ -34,10 +34,12 @@
              <span>此为任务作用中电气的的详情步骤工艺。</span>
              <div style="display: flex; margin-top: 0.81rem">
                <span style="margin-right: 1.25rem"
                  >步骤:{{ electric ? electric.maxNodal : "0" }}</span
                  >步骤:{{ electric ? electric[0].maxNodal : "0" }}</span
                >
                <span
                  >套筒数量:{{ electric ? electric.sumTorqueSum : "0" }}</span
                  >套筒数量:{{
                    electric ? electric[0].sumTorqueSum : "0"
                  }}</span
                >
              </div>
            </div>
@@ -102,11 +104,11 @@
              <span>此为任务作用中机械的的详情步骤工艺。</span>
              <div style="display: flex; margin-top: 0.81rem">
                <span style="margin-right: 1.25rem"
                  >步骤:{{ mechanical ? mechanical.maxNodal : "0" }}</span
                  >步骤:{{ mechanical ? mechanical[0].maxNodal : "0" }}</span
                >
                <span
                  >套筒数量:{{
                    mechanical ? mechanical.sumTorqueSum : "0"
                    mechanical ? mechanical[0].sumTorqueSum : "0"
                  }}</span
                >
              </div>
@@ -172,9 +174,11 @@
              <span>此为任务作用中地沟的的详情步骤工艺。</span>
              <div style="display: flex; margin-top: 0.81rem">
                <span style="margin-right: 1.25rem"
                  >步骤:{{ trench ? trench.maxNodal : "0" }}</span
                  >步骤:{{ trench ? trench[0].maxNodal : "0" }}</span
                >
                <span>套筒数量:{{ trench ? trench.sumTorqueSum : "0" }}</span>
                <span
                  >套筒数量:{{ trench ? trench[0].sumTorqueSum : "0" }}</span
                >
              </div>
            </div>
          </div>
@@ -332,7 +336,7 @@
            min-width="5%"
          />
          <el-table-column prop="tools" label="工具" min-width="2%" />
          <el-table-column prop="date" label="物料" min-width="1%" />
          <el-table-column prop="material" label="物料" min-width="1%" />
          <!-- <el-table-column prop="date" label="图片视频" min-width="2%" /> -->
          <el-table-column prop="" label="是否涉及" min-width="2%" />
          <el-table-column prop="setpNum" label="排序" min-width="1%" />
@@ -387,7 +391,45 @@
        ref="ruleFormRef"
      >
        <el-row :gutter="10">
          <el-col :span="16"
          <el-col :span="8"
            ><el-form-item prop="nodal">
              <template #label>
                <span style="font-size: 0.88rem; color: black">序号</span>
              </template>
              <el-input
                size="small"
                v-model.number="form.nodal"
                placeholder="请输入"
                style="height: 2rem"
              /> </el-form-item
          ></el-col>
          <el-col :span="8"
            ><el-form-item prop="setpNum">
              <template #label>
                <span style="font-size: 0.88rem; color: black">排序</span>
              </template>
              <el-input
                size="small"
                v-model.number="form.setpNum"
                placeholder="请输入"
                style="height: 2rem"
              /> </el-form-item
          ></el-col>
          <el-col :span="8"
            ><el-form-item prop="DeviceCode">
              <template #label>
                <span style="font-size: 0.88rem; color: black">物料</span>
              </template>
              <el-input
                v-model="form.material"
                style="height: 2rem"
                placeholder="请输入"
              /> </el-form-item
          ></el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col
            ><el-form-item prop="craftsStep">
              <template #label>
                <span style="font-size: 0.88rem; color: black"
@@ -401,32 +443,10 @@
                style="height: 2rem"
              /> </el-form-item
          ></el-col>
          <el-col :span="8"
            ><el-form-item prop="DeviceCode">
              <template #label>
                <span style="font-size: 0.88rem; color: black">物料</span>
              </template>
              <el-select
                v-model="WLvalue"
                placeholder="请选择"
                multiple
                filterable
                :remote-method="remoteMethod"
                :loading="loading"
                size="small"
                style="width: 240px"
              >
                <el-option
                  v-for="item in WLoptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                />
              </el-select> </el-form-item
          ></el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8"
          <!-- <el-col :span="8"
            ><el-form-item prop="isinvolved">
              <template #label>
                <span style="font-size: 0.88rem; color: black">是否涉及</span>
@@ -444,20 +464,8 @@
                  :value="item.value"
                />
              </el-select> </el-form-item
          ></el-col>
          <el-col :span="8"
            ><el-form-item prop="setnum">
              <template #label>
                <span style="font-size: 0.88rem; color: black">排序</span>
              </template>
              <el-input
                size="small"
                v-model.number="form.setnum"
                placeholder="请输入"
                style="height: 2rem"
              /> </el-form-item
          ></el-col>
          <el-col :span="8"
          ></el-col> -->
          <el-col :span="16"
            ><el-form-item prop="tools">
              <template #label>
                <div style="display: flex; align-items: center">
@@ -472,7 +480,6 @@
                :remote-method="GJremoteMethod"
                :loading="GJloading"
                size="small"
                style="width: 240px"
                value-key="id"
              >
                <el-option
@@ -481,20 +488,6 @@
                  :label="item.toolName"
                  :value="item"
                /> </el-select></el-form-item
          ></el-col>
        </el-row>
        <el-row :gutter="10">
          <el-col :span="8"
            ><el-form-item prop="nodal">
              <template #label>
                <span style="font-size: 0.88rem; color: black">序号</span>
              </template>
              <el-input
                size="small"
                v-model.number="form.nodal"
                placeholder="请输入"
                style="height: 2rem"
              /> </el-form-item
          ></el-col>
        </el-row>
        <!-- <el-row>
@@ -563,7 +556,12 @@
              <template #label>
                <span style="font-size: 0.88rem; color: black">内容描述</span>
              </template>
              <el-input v-model="form.craftContent" placeholder="请输入" />
              <el-input
                type="textarea"
                :rows="3"
                v-model="form.craftContent"
                placeholder="请输入"
              />
            </el-form-item>
          </el-col>
        </el-row>
@@ -618,7 +616,7 @@
                  <el-checkbox-group
                    :indeterminate="isIndeterminate"
                    @change="checkChange"
                    v-model="checkList"
                    v-model="checkboxId"
                    style="display: flex; flex-direction: column"
                  >
                    <el-checkbox
@@ -626,10 +624,7 @@
                      v-for="item in sleeveData"
                      :key="item.id"
                      :label="item.articleName"
                      :value="{
                        ...item,
                        num: 1,
                      }"
                      :value="item.id"
                    />
                  </el-checkbox-group>
                </el-scrollbar>
@@ -760,7 +755,7 @@
const selectoptions = ref([
  {
    value: "setpNum",
    label: "序号",
    label: "排序",
  },
  {
    value: "tools",
@@ -783,28 +778,30 @@
    { required: true, message: "请输入工艺内容", trigger: "blur" },
  ],
  nodal: [{ required: true, message: "请输入序号", trigger: "blur" }],
  setnum: [{ required: true, message: "请输入排序号", trigger: "blur" }],
  setpNum: [{ required: true, message: "请输入排序号", trigger: "blur" }],
});
// isinvolved: "", //是否涉及
//新增工艺/编辑工艺表单数据
const form = ref({
  id: 0,
  craftstype: "", //工艺类型(组)
  nodal: null, //节点
  craftsStep: "", //工艺步骤
  craftContent: "", //工艺内容
  sleeveNum: "", //套筒数量
  tools: "", //工具
  setnum: null,
  setpNum: null,
  torqueOne: 0,
  torqueOneQuantity: 0,
  articleOne: "",
  articleOneid: "",
  articleTowid: "",
  articleTwo: "",
  articleone: "",
  aritcleoneid: "",
  aritcletowid: "",
  articletwo: "",
  torqueSum: 0,
  torqueTwo: 0,
  torqueTwoQuantity: 0,
  material: "",
  creater: localStorage.getItem("user")
    ? JSON.parse(localStorage.getItem("user")).userName
    : "",
@@ -863,6 +860,8 @@
//编辑工艺
const Editcraft = (row) => {
  console.log(row);
  let data = Object.assign({}, row);
  type.value = "编辑";
  detailsDialogVisible.value = false;
@@ -930,11 +929,26 @@
  //   });
  //   return;
  // }
  string = tools.value
    .map((item) => {
      return item.toolName;
    })
    .join(",");
  if (tools.value.length > 0) {
    if (type.value == "编辑") {
      string = tools.value
        ? tools.value
            .map((item) => {
              return item;
            })
            .join(",")
        : "";
      return;
    }
    string = tools.value
      ? tools.value
          .map((item) => {
            return item.toolName;
          })
          .join(",")
      : "";
  }
  // if (checkList.value.length == 0) {
  //   ElMessage({
  //     message: "请选择套筒",
@@ -950,10 +964,14 @@
    return;
  }
  form.value.articleOneid = checkList.value[0].id;
  form.value.articleOne = checkList.value[0].num;
  form.value.articleTowid = checkList.value[1].id;
  form.value.articleTwo = checkList.value[1].num;
  form.value.aritcleoneid =
    checkList.value.length != 0 ? checkList.value[0].id : "";
  form.value.articleone =
    checkList.value.length != 0 ? checkList.value[0].num : "";
  form.value.aritcletowid =
    checkList.value.length != 0 ? checkList.value[1].id : "";
  form.value.articletwo =
    checkList.value.length != 0 ? checkList.value[1].num : "";
  form.value.creater = userName.value;
  form.value.tools = string;
  form.value.craftstype = title.value;
@@ -1069,7 +1087,7 @@
    {},
    {
      craftstype: "", //工艺类型(组)
      nodal: 0, //节点
      nodal: "", //节点
      craftsStep: "", //工艺步骤
      craftContent: "", //工艺内容
      sleeveNum: "", //套筒数量
@@ -1078,10 +1096,10 @@
      setpNum: "",
      torqueOne: 0,
      torqueOneQuantity: 0,
      articleOne: "",
      articleOneid: "",
      articleTowid: "",
      articleTwo: "",
      articleone: "",
      articleoneid: "",
      articletowid: "",
      articletwo: "",
      torqueSum: 0,
      torqueTwo: 0,
      torqueTwoQuantity: 0,
@@ -1089,6 +1107,7 @@
      createDate: formatTime(new Date()),
    }
  );
  tools.value = [];
};
//导出方法
const printExcel = () => {
@@ -1123,17 +1142,24 @@
const clear = () => {
  checkList.value = [];
};
const checkboxId = ref([]); //复选框选中事件
const checkChange = (e) => {
  console.log(e, checkList.value);
  checkList.value = [];
  sleeveData.value.forEach((item, index) => {
    if (checkboxId.value.includes(item.id)) {
      checkList.value.push({
        ...item,
        num: 1,
      });
    }
  });
};
const handleChange = () => {
  console.log(checkList.value);
};
const handleCheckAllChange = (val) => {
  console.log(val);
  checkList.value = val ? sleeveData.value : [];
  isIndeterminate.value = false;
  console.log(checkList.value);
};
// åˆ é™¤å·¥è‰º
const delProcess = (val) => {
@@ -1149,14 +1175,17 @@
};
onMounted(() => {
  GetSleeveandStep("电气").then((res) => {
    electric.value = res.data[0];
  });
  GetSleeveandStep("机械").then((res) => {
    mechanical.value = res.data[0];
  });
  GetSleeveandStep("地沟").then((res) => {
    trench.value = res.data[0];
  GetSleeveandStep().then((res) => {
    electric.value = res.data.filter((item) => {
      return item.craftType == "电气";
    });
    mechanical.value = res.data.filter((item) => {
      return item.craftType == "机械";
    });
    trench.value = res.data.filter((item) => {
      return item.craftType == "地沟";
    });
    console.log(electric.value);
  });
  user.value = JSON.parse(localStorage.getItem("user")).userName;
});
ÏîÄ¿´úÂë/client/src/views/tts/TheCurrentJob/Startjob.vue
@@ -308,8 +308,9 @@
                >
              </div>
              <el-input
                type="number"
                v-if="isTorque"
                v-model.number="torqueFrom.torqueSize"
                v-model="torqueFrom.torqueSize"
                style="font-size: 0.75rem; height: 2rem"
                placeholder="请输入扭力值"
              />
@@ -779,7 +780,13 @@
  AddTorque(torqueFrom.value)
    .then((res) => {
      console.log("添加成功", res);
      if (res.code == 400) {
        ElMessage({
          message: res.message,
          type: "warning",
        });
        return;
      }
      ElMessage({
        message: "添加成功",
        type: "success",
@@ -860,7 +867,7 @@
      .rect-item1 {
        display: flex;
        flex-direction: column;
        width: 14.31rem;
        width: 16rem;
        height: 15.38rem;
        background-image: url("../../../assets/TheCurrentJob/bg.png");
        background-repeat: no-repeat;
ÏîÄ¿´úÂë/client/src/views/tts/UserManagement/Usermanagement.vue
@@ -1256,7 +1256,7 @@
    {
      name: queryForm.selectType,
      value: queryForm.selectInput,
      displayType: "String",
      displayType: "like",
    },
    {
      name: "pustatus",