zouyu
2023-10-23 18d02e7db16cf5a21f8d5a152dd7ab27212d8eb6
	modified:   src/views/admin/menu/index.vue
modified: src/views/admin/menu/menu-form.vue
modified: src/views/plan/customerorder/customerorder-form.vue
modified: src/views/technology/completeproductstructure/completeproductstructure-form.vue
modified: src/views/technology/completeproductstructure/index.vue
modified: src/views/technology/document/document-form.vue
modified: src/views/technology/operation/operation-form.vue
modified: src/views/technology/structure/index.vue
modified: vue.config.js
已修改9个文件
752 ■■■■ 文件已修改
src/views/admin/menu/index.vue 169 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/admin/menu/menu-form.vue 260 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/plan/customerorder/customerorder-form.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/technology/completeproductstructure/completeproductstructure-form.vue 284 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/technology/completeproductstructure/index.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/technology/document/document-form.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/technology/operation/operation-form.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/technology/structure/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
vue.config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/admin/menu/index.vue
@@ -3,8 +3,12 @@
    <div class="avue-crud">
      <el-form :inline="true">
        <el-form-item>
          <el-button v-if="permissions.sys_menu_add" icon="el-icon-plus" type="primary"
                     @click="addOrUpdateHandle(false)">
          <el-button
            v-if="permissions.sys_menu_add"
            icon="el-icon-plus"
            type="primary"
            @click="addOrUpdateHandle(false)"
          >
            添加
          </el-button>
        </el-form-item>
@@ -15,15 +19,25 @@
        v-loading="loading"
        :data="menuList"
        row-key="id"
        :tree-props="{children: 'children', hasChildren: 'hasChildrens'}">
        <el-table-column prop="name" label="菜单名称" :show-overflow-tooltip="true" width="180"></el-table-column>
        :tree-props="{ children: 'children', hasChildren: 'hasChildrens' }"
      >
        <el-table-column
          prop="name"
          label="菜单名称"
          :show-overflow-tooltip="true"
          width="180"
        ></el-table-column>
        <el-table-column prop="icon" label="图标" align="center" width="100">
          <template slot-scope="scope">
            <i :class="scope.row.icon"/>
            <i :class="scope.row.icon" />
          </template>
        </el-table-column>
        <el-table-column prop="sort" label="排序" width="60"></el-table-column>
        <el-table-column prop="path" label="组件路径" :show-overflow-tooltip="true"></el-table-column>
        <el-table-column
          prop="path"
          label="组件路径"
          :show-overflow-tooltip="true"
        ></el-table-column>
        <el-table-column prop="type" label="类型" width="80" align="center">
          <template slot-scope="scope">
            <el-tag type="success" v-if="scope.row.type === '0'">左菜单</el-tag>
@@ -31,96 +45,121 @@
            <el-tag type="info" v-if="scope.row.type === '1'">按钮</el-tag>
          </template>
        </el-table-column>
        <el-table-column prop="keepAlive" label="缓冲" width="80" align="center">
        <el-table-column
          prop="keepAlive"
          label="缓冲"
          width="80"
          align="center"
        >
          <template slot-scope="scope">
            <el-tag type="info" v-if="scope.row.keepAlive === '0'">关闭</el-tag>
            <el-tag type="success" v-if="scope.row.keepAlive === '1'">开启</el-tag>
            <el-tag type="success" v-if="scope.row.keepAlive === '1'"
              >开启</el-tag
            >
          </template>
        </el-table-column>
        <el-table-column prop="permission" label="权限标识" :show-overflow-tooltip="true"></el-table-column>
        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <el-table-column
          prop="permission"
          label="权限标识"
          :show-overflow-tooltip="true"
        ></el-table-column>
        <el-table-column
          label="操作"
          align="center"
          class-name="small-padding fixed-width"
        >
          <template slot-scope="scope">
            <el-button
              size="small"
              type="text"
              icon="el-icon-plus"
              @click="addOrUpdateHandle(false,scope.row.id)"
              v-if="permissions.sys_menu_add">新增
              @click="addOrUpdateHandle(false, scope.row.id)"
              v-if="permissions.sys_menu_add"
              >新增
            </el-button>
            <el-button size="small"
                       type="text"
                       icon="el-icon-edit"
                       @click="addOrUpdateHandle(true,scope.row.id)"
                       v-if="permissions.sys_menu_edit">修改
            <el-button
              size="small"
              type="text"
              icon="el-icon-edit"
              @click="addOrUpdateHandle(true, scope.row.id)"
              v-if="permissions.sys_menu_edit"
              >修改
            </el-button>
            <el-button
              size="small"
              type="text"
              icon="el-icon-delete"
              @click="handleDelete(scope.row)"
              v-if="permissions.sys_menu_del">删除
              v-if="permissions.sys_menu_del"
              >删除
            </el-button>
          </template>
        </el-table-column>
      </el-table>
      <table-form v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getList"></table-form>
      <table-form
        v-if="addOrUpdateVisible"
        ref="addOrUpdate"
        @refreshDataList="getList"
      ></table-form>
    </div>
  </basic-container>
</template>
<script>
  import {delObj, fetchMenuTree} from '@/api/admin/menu'
  import TableForm from './menu-form'
  import {mapGetters} from 'vuex'
import { delObj, fetchMenuTree } from '@/api/admin/menu'
import TableForm from './menu-form'
import { mapGetters } from 'vuex'
  export default {
    name: "Menu",
    components: {TableForm},
    data() {
      return {
        addOrUpdateVisible: false,
        // 遮罩层
        loading: true,
        // 菜单表格树数据
        menuList: [],
        // 菜单树选项
        menuOptions: [],
      };
export default {
  name: 'Menu',
  components: { TableForm },
  data() {
    return {
      addOrUpdateVisible: false,
      // 遮罩层
      loading: true,
      // 菜单表格树数据
      menuList: [],
      // 菜单树选项
      menuOptions: []
    }
  },
  created() {
    this.getList()
  },
  computed: {
    ...mapGetters(['permissions'])
  },
  methods: {
    addOrUpdateHandle(isEdit, id) {
      this.addOrUpdateVisible = true
      this.$nextTick(() => {
        this.$refs.addOrUpdate.init(isEdit, id)
      })
    },
    created() {
      this.getList();
    getList() {
      this.loading = true
      fetchMenuTree(false).then((response) => {
        this.menuList = response.data.data
        this.loading = false
      })
    },
    computed: {
      ...mapGetters(['permissions']),
    },
    methods: {
      addOrUpdateHandle(isEdit, id) {
        this.addOrUpdateVisible = true
        this.$nextTick(() => {
          this.$refs.addOrUpdate.init(isEdit, id)
    handleDelete(row) {
      this.$confirm('是否确认删除名称为"' + row.name + '"的数据项?', '警告', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        closeOnClickModal: false,
        type: 'warning'
      })
        .then(function() {
          return delObj(row.id)
        })
      },
      getList() {
        this.loading = true;
        fetchMenuTree(false).then(response => {
          this.menuList = response.data.data
          this.loading = false;
        });
      },
      handleDelete(row) {
        this.$confirm('是否确认删除名称为"' + row.name + '"的数据项?', "警告", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          closeOnClickModal:false,
          type: "warning"
        }).then(function () {
          return delObj(row.id);
        }).then(() => {
          this.getList();
        .then(() => {
          this.getList()
          this.$message.success('删除成功')
        })
      }
    }
  };
  }
}
</script>
src/views/admin/menu/menu-form.vue
@@ -1,7 +1,6 @@
<template>
  <!-- 添加或修改菜单对话框 -->
  <el-dialog :title="!form.menuId ? '新增': '修改'"
             :visible.sync="visible">
  <el-dialog :title="!form.menuId ? '新增' : '修改'" :visible.sync="visible">
    <el-form ref="dataForm" :model="form" :rules="rules" label-width="80px">
      <el-row>
        <el-col :span="12">
@@ -15,35 +14,51 @@
        </el-col>
        <el-col :span="12">
          <el-form-item label="上级菜单">
            <treeselect v-model="form.parentId"
                        :options="menuOptions"
                        :normalizer="normalizer"
                        :show-count="true"
                        placeholder="选择上级菜单"
            <treeselect
              v-model="form.parentId"
              :options="menuOptions"
              :normalizer="normalizer"
              :show-count="true"
              placeholder="选择上级菜单"
            />
          </el-form-item>
        </el-col>
      </el-row>
      <el-form-item label="图标" prop="icon" v-if="form.type !== '1'">
        <avue-icon-select v-model="form.icon" :icon-list="iconList"></avue-icon-select>
        <avue-icon-select
          v-model="form.icon"
          :icon-list="iconList"
        ></avue-icon-select>
      </el-form-item>
      <el-form-item label="名称" prop="name">
        <el-input v-model="form.name" placeholder="请输入菜单名称"/>
        <el-input v-model="form.name" placeholder="请输入菜单名称" />
      </el-form-item>
      <el-form-item label="路由地址" prop="path" v-if="form.type !== '1'">
        <el-input v-model="form.path" placeholder="请输入路由地址"/>
        <el-input v-model="form.path" placeholder="请输入路由地址" />
      </el-form-item>
      <el-form-item label="权限标识" prop="permission" v-if="form.type === '1'">
        <el-input v-model="form.permission" placeholder="请权限标识" maxlength="50"/>
        <el-input
          v-model="form.permission"
          placeholder="请权限标识"
          maxlength="50"
        />
      </el-form-item>
      <el-row>
        <el-col :span="12">
          <el-form-item label="排序" prop="sort">
            <el-input-number v-model="form.sort" controls-position="right" :min="0"/>
            <el-input-number
              v-model="form.sort"
              controls-position="right"
              :min="0"
            />
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="路由缓冲" prop="keepAlive" v-if="form.type !== '1'">
          <el-form-item
            label="路由缓冲"
            prop="keepAlive"
            v-if="form.type !== '1'"
          >
            <el-radio-group v-model="form.keepAlive">
              <el-radio-button label="0">否</el-radio-button>
              <el-radio-button label="1">是</el-radio-button>
@@ -60,117 +75,118 @@
</template>
<script>
  import {addObj, fetchMenuTree, getObj, putObj} from '@/api/admin/menu'
  import Treeselect from "@riophae/vue-treeselect"
  import iconList from '@/const/iconList'
  import TableForm from './'
  import "@riophae/vue-treeselect/dist/vue-treeselect.css"
import { addObj, fetchMenuTree, getObj, putObj } from '@/api/admin/menu'
import Treeselect from '@riophae/vue-treeselect'
import iconList from '@/const/iconList'
import TableForm from './'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
  export default {
    name: "Menu",
    components: {Treeselect, TableForm},
    data() {
      return {
        // 遮罩层
        loading: true,
        // 菜单树选项
        menuOptions: [],
        // 是否显示弹出层
        visible: false,
        // 图标
        iconList: iconList,
        form: {
          menuId: undefined,
          name: undefined,
          path: undefined,
          icon: undefined,
          permission: undefined,
          type: '0',
          keepAlive: '0',
          sort: 999
        },
        // 表单校验
        rules: {
          name: [
            {required: true, message: "菜单名称不能为空", trigger: "blur"}
          ],
          sort: [
            {required: true, message: "菜单顺序不能为空", trigger: "blur"}
          ],
          path: [
            {required: true, message: "路由地址不能为空", trigger: "blur"}
          ],
          keepAlive: [
            {required: true, message: "路由缓冲不能为空", trigger: "blur"}
          ],
          permission: [
            {required: true, message: "权限标识不能为空", trigger: "blur"}
          ]
        }
      };
    },
    methods: {
      init(isEdit, id) {
        if (id != null) {
          this.form.parentId = id;
        }
        this.visible = true
        this.getTreeselect();
        this.$nextTick(() => {
          this.$refs['dataForm'].resetFields()
          if (isEdit) {
            getObj(id).then(response => {
              this.form = response.data.data
            })
          } else {
            this.form.menuId = undefined
          }
        })
export default {
  name: 'Menu',
  // eslint-disable-next-line vue/no-unused-components
  components: { Treeselect, TableForm },
  data() {
    return {
      // 遮罩层
      loading: true,
      // 菜单树选项
      menuOptions: [],
      // 是否显示弹出层
      visible: false,
      // 图标
      iconList: iconList,
      form: {
        menuId: undefined,
        name: undefined,
        path: undefined,
        icon: undefined,
        permission: undefined,
        type: '0',
        keepAlive: '0',
        sort: 999
      },
      // 表单提交
      dataFormSubmit() {
        this.$refs['dataForm'].validate((valid) => {
          if (valid) {
            if (this.form.parentId === undefined) {
              this.form.parentId = -1
            }
            if (this.form.menuId) {
              putObj(this.form).then(data => {
                this.$message.success('修改成功')
                this.visible = false
                this.$emit('refreshDataList')
              });
            } else {
              addObj(this.form).then(data => {
                this.$message.success('添加成功')
                this.visible = false
                this.$emit('refreshDataList')
              })
            }
          }
        })
      },
      /** 查询菜单下拉树结构 */
      getTreeselect() {
        fetchMenuTree().then(response => {
          this.menuOptions = [];
          const menu = {id: -1, name: '根菜单', children: []};
          menu.children = response.data.data;
          this.menuOptions.push(menu);
        });
      },
      /** 转换菜单数据结构 */
      normalizer(node) {
        if (node.children && !node.children.length) {
          delete node.children;
        }
        return {
          id: node.id,
          label: node.name,
          children: node.children
        };
      // 表单校验
      rules: {
        name: [
          { required: true, message: '菜单名称不能为空', trigger: 'blur' }
        ],
        sort: [
          { required: true, message: '菜单顺序不能为空', trigger: 'blur' }
        ],
        path: [
          { required: true, message: '路由地址不能为空', trigger: 'blur' }
        ],
        keepAlive: [
          { required: true, message: '路由缓冲不能为空', trigger: 'blur' }
        ],
        permission: [
          { required: true, message: '权限标识不能为空', trigger: 'blur' }
        ]
      }
    }
  };
  },
  methods: {
    init(isEdit, id) {
      if (id != null) {
        this.form.parentId = id
      }
      this.visible = true
      this.getTreeselect()
      this.$nextTick(() => {
        this.$refs.dataForm.resetFields()
        if (isEdit) {
          getObj(id).then((response) => {
            this.form = response.data.data
          })
        } else {
          this.form.menuId = undefined
        }
      })
    },
    // 表单提交
    dataFormSubmit() {
      this.$refs.dataForm.validate((valid) => {
        if (valid) {
          if (this.form.parentId === undefined) {
            this.form.parentId = -1
          }
          if (this.form.menuId) {
            putObj(this.form).then((data) => {
              this.$message.success('修改成功')
              this.visible = false
              this.$emit('refreshDataList')
            })
          } else {
            addObj(this.form).then((data) => {
              this.$message.success('添加成功')
              this.visible = false
              this.$emit('refreshDataList')
            })
          }
        }
      })
    },
    /** 查询菜单下拉树结构 */
    getTreeselect() {
      fetchMenuTree().then((response) => {
        this.menuOptions = []
        const menu = { id: -1, name: '根菜单', children: [] }
        menu.children = response.data.data
        this.menuOptions.push(menu)
      })
    },
    /** 转换菜单数据结构 */
    normalizer(node) {
      if (node.children && !node.children.length) {
        delete node.children
      }
      return {
        id: node.id,
        label: node.name,
        children: node.children
      }
    }
  }
}
</script>
src/views/plan/customerorder/customerorder-form.vue
@@ -635,15 +635,16 @@
              show-overflow-tooltip
            >
            </el-table-column>
            <el-table-column prop="lineNumber" align="center" label="行号">
            </el-table-column>
            <!-- <el-table-column prop="lineNumber" align="center" label="行号"> -->
            <!-- </el-table-column> -->
            <el-table-column
              prop="originalFileName"
              align="center"
              label="原文件名"
              width="200"
            >
            </el-table-column>
            <el-table-column prop="fileName" align="center" label="文件名">
            <el-table-column prop="fileName" align="center" label="文件后缀">
            </el-table-column>
            <el-table-column prop="createUser" align="center" label="上传人">
            </el-table-column>
@@ -676,13 +677,13 @@
            <!--            </el-table-column>-->
            <el-table-column fixed="right" align="center" label="操作">
              <template slot-scope="scope">
                <el-button
                <!-- <el-button
                  @click="synchronizeFile(scope.row)"
                  type="text"
                  size="small"
                  :disabled="scope.row.lineNumber !== dataForm.customerNo"
                  >同步</el-button
                >
                > -->
                <el-button
                  @click="delProcessConfigFile(scope.row)"
                  type="text"
src/views/technology/completeproductstructure/completeproductstructure-form.vue
@@ -1,5 +1,5 @@
<template>
  <div style="height: 100%">
  <div>
    <div class="page-header">
      <div class="header-left">
        <a @click="$router.go(-1)"><i class="icon-btn-back"></i></a>
@@ -30,12 +30,12 @@
              </el-form-item>
              <el-form-item label="零件号" prop="partNo">
                <el-input v-model="treeForm.partNo" placeholder="零件" readonly>
                  <el-button
                <el-input v-model="treeForm.partNo" placeholder="零件" disabled>
                  <!-- <el-button
                    slot="append"
                    icon="el-icon-search"
                    @click="showProductStructure = true"
                  ></el-button>
                  ></el-button> -->
                </el-input>
              </el-form-item>
@@ -117,8 +117,25 @@
      </div>
      <div class="completeProductStructure-detail">
        <div class="completeProductStructure-design">
          <div class="completeProductStructure-design-title">构建BOM</div>
          <div class="completeProductStructure-design-title">BOM</div>
          <el-table
            class="tree-select-table"
            ref="tableRef"
            :data="tableData"
            style="width: 100%;"
            row-key="id"
            border
            height="580"
            default-expand-all
            @expand-change="expandChange"
            :row-class-name="tableRowClassName"
          >
            <el-table-column label="零件编号" prop="partNo"></el-table-column>
            <el-table-column label="零件名称" prop="partName"></el-table-column>
            <el-table-column label="单位" prop="unit"></el-table-column>
            <el-table-column label="数量" prop="qpa"></el-table-column>
          </el-table>
          <!-- <el-table
            class="tree-select-table"
            ref="tableRef"
            :data="tableData"
@@ -155,10 +172,10 @@
            </el-table-column>
            <el-table-column prop="operationName" label="消耗工序">
            </el-table-column>
          </el-table>
          </el-table> -->
        </div>
        <div class="completeProductStructure-queryPreview"></div>
        <div class="completeProductStructure-preview">
        <!-- <div class="completeProductStructure-queryPreview"></div> -->
        <!-- <div class="completeProductStructure-preview">
          <div class="completeProductStructure-preview-title">结果预览</div>
          <el-table
            :data="preViewData"
@@ -200,7 +217,7 @@
            <el-table-column prop="operationName" label="消耗工序">
            </el-table-column>
          </el-table>
        </div>
        </div> -->
      </div>
    </div>
    <productStructureDialog
@@ -336,13 +353,13 @@
          this.dataForm.state = resultData.state
          this.preViewData = []
          this.preViewData.push(resultData.tree)
          this.tableData = []
          getPartAllStructureExt(this.treeForm).then((res) => {
            const result = res.data
            if (result.code === 0) {
              this.tableData.push(result.data)
            }
          })
          this.tableData = resultData.bomComponentVOS
          // getPartAllStructureExt(this.treeForm).then((res) => {
          //   const result = res.data
          //   if (result.code === 0) {
          //     this.tableData.push(result.data)
          //   }
          // })
        })
      } else {
        this.initDefaultForm()
@@ -395,110 +412,111 @@
      }
    },
    dataFormSubmit() {
      const mapTree = (org) => {
        const haveChildren =
          Array.isArray(org.children) && org.children.length > 0
        return {
          checked: org.checked,
          compId: org.compId,
          discNum: org.discNum || 1,
          expand: org.expand,
          id: org.id,
          operationId: org.operationId,
          operationName: org.operationName,
          operationNo: org.operationNo,
          originalQpa: org.originalQpa,
          parentId: org.parentId,
          partId: org.partId,
          partName: org.partName,
          partNo: org.partNo,
          version: org.version,
          alternativeNo: org.alternativeNo,
          alternativeDesc: org.alternativeDesc,
          qpa: org.qpa,
          structureId: org.structureId,
          unit: org.unit,
          color: org.color,
          planningMethod: org.planningMethod,
          children: haveChildren ? org.children.map((i) => mapTree(i)) : []
        }
      }
      console.log(this.treeForm)
      // const mapTree = (org) => {
      //   const haveChildren =
      //     Array.isArray(org.children) && org.children.length > 0
      //   return {
      //     checked: org.checked,
      //     compId: org.compId,
      //     discNum: org.discNum || 1,
      //     expand: org.expand,
      //     id: org.id,
      //     operationId: org.operationId,
      //     operationName: org.operationName,
      //     operationNo: org.operationNo,
      //     originalQpa: org.originalQpa,
      //     parentId: org.parentId,
      //     partId: org.partId,
      //     partName: org.partName,
      //     partNo: org.partNo,
      //     version: org.version,
      //     alternativeNo: org.alternativeNo,
      //     alternativeDesc: org.alternativeDesc,
      //     qpa: org.qpa,
      //     structureId: org.structureId,
      //     unit: org.unit,
      //     color: org.color,
      //     planningMethod: org.planningMethod,
      //     children: haveChildren ? org.children.map((i) => mapTree(i)) : []
      //   }
      // }
      this.isSubmit = true
      this.generateStructure()
      if (this.preViewData != null && this.preViewData.length > 0) {
        if (this.preViewData.length === 1) {
          if (this.dataForm.id) {
            var updateObj = {}
            updateObj.id = this.dataForm.id
            updateObj.partId = this.treeForm.partId
            updateObj.number = this.treeForm.number
            updateObj.insulationColor = this.treeForm.insulationColor
            updateObj.sheathColor = this.treeForm.sheathColor
            updateObj.characteristicOne = this.treeForm.characteristicOne
            updateObj.version = this.treeForm.version
            updateObj.alternativeNo = this.treeForm.alternativeNo
            updateObj.alternativeDesc = this.treeForm.alternativeDesc
            updateObj.bomTypeDb = this.treeForm.bomTypeDb
      // this.isSubmit = true
      // this.generateStructure()
      // if (this.preViewData != null && this.preViewData.length > 0) {
      //   if (this.preViewData.length === 1) {
      //     if (this.dataForm.id) {
      //       var updateObj = {}
      //       updateObj.id = this.dataForm.id
      //       updateObj.partId = this.treeForm.partId
      //       updateObj.number = this.treeForm.number
      //       updateObj.insulationColor = this.treeForm.insulationColor
      //       updateObj.sheathColor = this.treeForm.sheathColor
      //       updateObj.characteristicOne = this.treeForm.characteristicOne
      //       updateObj.version = this.treeForm.version
      //       updateObj.alternativeNo = this.treeForm.alternativeNo
      //       updateObj.alternativeDesc = this.treeForm.alternativeDesc
      //       updateObj.bomTypeDb = this.treeForm.bomTypeDb
            // const tree = this.preViewData[0];
            const gxqTree = this.preViewData.map((org) => mapTree(org))
            // this.setDefaultDiscNum(gxqTree);
            updateObj.tree = gxqTree[0]
            putObj(updateObj)
              .then((response) => {
                var data = response.data
                if (data.code === 0) {
                  this.$message.success('修改成功')
                } else {
                  this.$message.error('修改失败')
                }
                this.isSubmit = false
              })
              .catch((error) => {
                this.isSubmit = false
                console.log(error)
              })
          } else {
            var newObj = {}
            newObj.id = null
            newObj.partId = this.treeForm.partId
            newObj.number = this.treeForm.number
            newObj.insulationColor = this.treeForm.insulationColor
            newObj.sheathColor = this.treeForm.sheathColor
            newObj.characteristicOne = this.treeForm.characteristicOne
            newObj.version = this.treeForm.version
            newObj.alternativeNo = this.treeForm.alternativeNo
            newObj.alternativeDesc = this.treeForm.alternativeDesc
            newObj.bomTypeDb = this.treeForm.bomTypeDb
            const gxqTree = this.preViewData.map((org) => mapTree(org))
      //       // const tree = this.preViewData[0];
      //       const gxqTree = this.preViewData.map((org) => mapTree(org))
      //       // this.setDefaultDiscNum(gxqTree);
      //       updateObj.tree = gxqTree[0]
      //       putObj(updateObj)
      //         .then((response) => {
      //           var data = response.data
      //           if (data.code === 0) {
      //             this.$message.success('修改成功')
      //           } else {
      //             this.$message.error('修改失败')
      //           }
      //           this.isSubmit = false
      //         })
      //         .catch((error) => {
      //           this.isSubmit = false
      //           console.log(error)
      //         })
      //     } else {
      //       var newObj = {}
      //       newObj.id = null
      //       newObj.partId = this.treeForm.partId
      //       newObj.number = this.treeForm.number
      //       newObj.insulationColor = this.treeForm.insulationColor
      //       newObj.sheathColor = this.treeForm.sheathColor
      //       newObj.characteristicOne = this.treeForm.characteristicOne
      //       newObj.version = this.treeForm.version
      //       newObj.alternativeNo = this.treeForm.alternativeNo
      //       newObj.alternativeDesc = this.treeForm.alternativeDesc
      //       newObj.bomTypeDb = this.treeForm.bomTypeDb
      //       const gxqTree = this.preViewData.map((org) => mapTree(org))
            newObj.tree = gxqTree[0]
            addObj(newObj)
              .then((response) => {
                var data = response.data
                if (data.code === 0) {
                  this.dataForm.id = data.data.id
                  this.treeForm.number = data.data.number
                  this.$message.success('保存成功')
                } else {
                  this.$message.error('保存失败')
                }
                this.isSubmit = false
              })
              .catch((error) => {
                this.isSubmit = false
                console.log(error)
              })
          }
        } else {
          this.isSubmit = false
          this.$message.error('存在多个根节点,无法进行保存')
        }
      } else {
        this.isSubmit = false
        this.$message.error('请先构建BOM,再进行保存')
      }
      //       newObj.tree = gxqTree[0]
      //       addObj(newObj)
      //         .then((response) => {
      //           var data = response.data
      //           if (data.code === 0) {
      //             this.dataForm.id = data.data.id
      //             this.treeForm.number = data.data.number
      //             this.$message.success('保存成功')
      //           } else {
      //             this.$message.error('保存失败')
      //           }
      //           this.isSubmit = false
      //         })
      //         .catch((error) => {
      //           this.isSubmit = false
      //           console.log(error)
      //         })
      //     }
      //   } else {
      //     this.isSubmit = false
      //     this.$message.error('存在多个根节点,无法进行保存')
      //   }
      // } else {
      //   this.isSubmit = false
      //   this.$message.error('请先构建BOM,再进行保存')
      // }
    },
    // 生成最终的结构
    generateStructure() {
@@ -924,19 +942,19 @@
      }
    },
    bomTypeDbChange(e) {
      if (e) {
        this.before = this.treeForm.bomTypeDb
      } else {
        if (this.before !== this.treeForm.bomTypeDb) {
          this.treeForm.partId = null
          this.treeForm.partNo = null
          this.treeForm.partName = null
          this.treeForm.version = null
          this.treeForm.alternativeNo = null
          this.treeForm.alternativeDesc = null
          this.tableData = []
        }
      }
      // if (e) {
      //   this.before = this.treeForm.bomTypeDb
      // } else {
      //   if (this.before !== this.treeForm.bomTypeDb) {
      //     this.treeForm.partId = null
      //     this.treeForm.partNo = null
      //     this.treeForm.partName = null
      //     this.treeForm.version = null
      //     this.treeForm.alternativeNo = null
      //     this.treeForm.alternativeDesc = null
      //     this.tableData = []
      //   }
      // }
    },
    // table设置行样式
    tableRowClassName({ row, rowIndex }) {
@@ -989,8 +1007,8 @@
.completeProductStructure-design {
  float: left;
  width: 48%;
  height: 800px;
  width: 100%;
  height: 650px;
  padding: 10px 20px;
  border: 1px solid #ddd;
  background-color: #fff;
@@ -1026,7 +1044,7 @@
  color: #006eff;
}
.forbid-row .cell {
  color: #c0c4cc;
  color: #000;
}
.tree-select-table th.gutter {
src/views/technology/completeproductstructure/index.vue
@@ -214,13 +214,13 @@
          }
        ],
        toolbar: [
          {
            text: '新增',
            type: 'primary',
            fun: this.addOrUpdateHandle,
            disabled: false,
            permitArr: []
          },
          // {
          //   text: '新增',
          //   type: 'primary',
          //   fun: this.addOrUpdateHandle,
          //   disabled: false,
          //   permitArr: []
          // },
          {
            text: '产品结构生成BOM',
            fun: this.addByStructureHandle,
src/views/technology/document/document-form.vue
@@ -604,7 +604,7 @@
              </el-collapse>
            </el-card>
          </el-tab-pane>
          <el-tab-pane label="图片上传" style="height: 100%">
          <!-- <el-tab-pane label="图片上传" style="height: 100%">
            <el-card class="document-structure">
              <div slot="header">
                <span>结构图</span>
@@ -691,7 +691,7 @@
                <img width="100%" :src="dialogFlowImageUrl" alt="" />
              </el-dialog>
            </el-card>
          </el-tab-pane>
          </el-tab-pane> -->
        </el-tabs>
      </div>
    </div>
src/views/technology/operation/operation-form.vue
@@ -307,7 +307,7 @@
              </el-table>
            </el-card>
          </el-tab-pane>
          <el-tab-pane
          <!-- <el-tab-pane
            v-if="isShowStepBusiness"
            label="工步"
            style="height: 100%"
@@ -363,7 +363,7 @@
                </el-table-column>
              </el-table>
            </el-card>
          </el-tab-pane>
          </el-tab-pane> -->
        </el-tabs>
        <ParamTemplateDialog
          :currshowlist.sync="showOperationTemplate"
src/views/technology/structure/index.vue
@@ -13,9 +13,9 @@
        ref="structureTable"
      >
        <template #toolbar>
          <el-button type="primary" :loading="ifsSynsLoading" @click="syncIfs"
          <!-- <el-button type="primary" :loading="ifsSynsLoading" @click="syncIfs"
            >ERP同步</el-button
          >
          > -->
        </template>
      </ttable>
      <!-- 弹窗, 新增 / 修改 -->
vue.config.js
@@ -2,7 +2,7 @@
 * 配置参考:
 * https://cli.vuejs.org/zh/config/
 */
const url = 'http://192.168.83.249:9999'
const url = 'http://192.168.0.23:9999'
const localUrl = 'http://localhost:8089'
//const localUrl = 'http://10.88.15.95:8089'
const CompressionWebpackPlugin = require('compression-webpack-plugin')