zouyu
2023-09-14 7c86df822b4b8d06ee89388ea75ad5f47a89373e
	modified:   src/App.vue
modified: src/assets/api/controller.js
modified: src/components/view/rawInsDetail.vue
modified: src/components/view/standard-table/material.vue
modified: src/components/view/standard-table/product.vue
modified: src/components/view/standard-table/target.vue
modified: src/components/view/standard-table/technology.vue
modified: src/components/view/standard.vue
modified: src/components/view/rawInsDetail.vue
已修改8个文件
100 ■■■■ 文件已修改
src/App.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/api/controller.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/rawInsDetail.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/standard-table/material.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/standard-table/product.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/standard-table/target.vue 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/standard-table/technology.vue 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/standard.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/App.vue
@@ -118,7 +118,7 @@
      font-size: 18px;
      font-weight: bold;
      position: absolute;
      right: -225px;
      right: -240px;
      top: 16px;
      z-index: 999;
  }
@@ -126,7 +126,7 @@
      font-size: 18px;
      font-weight: bold;
      position: absolute;
      right: -425px;
      right: -440px;
      top: 16px;
      z-index: 999;
  }
src/assets/api/controller.js
@@ -7,6 +7,7 @@
    selectTechnologyByMaterial: "technology/select",
    selectAll:"/material/selectAll",//右侧数据
    technologyWrite:"/technology/write",//工艺路线,移开保存生产定额
    writeDevice:"/technology/writeDevice",//工艺路线,选择设备组,移开保存
    productWrite:"/product/write",//技术指标,移开保存内控值和标准值
    chooseFather: "/technology/chooseFather",//获取工序列表
    chooseDevice: "/technology/chooseDevice",//获取设备组列表
src/components/view/rawInsDetail.vue
@@ -350,6 +350,7 @@
</template>
<script>
import { triggerRef } from "vue";
import RawIns from "./raw-ins.vue";
export default {
  components: { RawIns },
@@ -383,6 +384,7 @@
      } else {
        conclusion.testState = 1;
      }
      console.log([conclusion]);
      return [conclusion];
    }
  },
@@ -505,6 +507,7 @@
        name: "",
        required: "",
        textValue: "",
        testState:null,
        testValueList: [],
        unit: ""
      };
src/components/view/standard-table/material.vue
@@ -9,7 +9,7 @@
              </el-table-column>
              <el-table-column type="index" width="60" label="序号">
              </el-table-column>
              <el-table-column prop="father" label="工序" :resizable="false">
              <el-table-column prop="father" label="工序" width="200" :resizable="false">
                <template slot-scope="scope">
                  <el-tag class="tag" v-if="scope.row.father != null" type="primary">01</el-tag>
                  <span style="color: #000000">
@@ -17,7 +17,7 @@
                  </span>
              </template>
              </el-table-column>
              <el-table-column prop="tname" sortable label="工艺名称" :resizable="false">
              <el-table-column prop="tname" label="工艺名称" width="200" :resizable="false">
                <template slot-scope="scope">
                  <el-tag type="success" v-if="scope.row.tname != null" class="tag">02</el-tag>
                  <span style="color: #000000">
@@ -25,7 +25,7 @@
                  </span>
                  </template>
              </el-table-column>
              <el-table-column prop="mname" label="材料名称" :resizable="false">
              <el-table-column prop="mname" label="材料名称" width="200" :resizable="false">
                <template slot-scope="scope">
                  <el-tag type="info" class="tag" color="#faf2ff" v-if="scope.row.mname != null">
                    <span style="color: #e1affb">03</span>
src/components/view/standard-table/product.vue
@@ -44,19 +44,19 @@
        :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
        <el-table-column type="selection" width="55"></el-table-column>
        <el-table-column type="index" width="60" label="序号"></el-table-column>
        <el-table-column prop="father" label="工序" :resizable="false">
        <el-table-column prop="father" label="工序" width="200" :resizable="false">
            <template slot-scope="scope">
                <el-tag type="primary" class="tag" v-if="scope.row.father != null">01</el-tag>
                <span>{{scope.row.father}}</span>
            </template>
        </el-table-column>
        <el-table-column prop="name" label="工艺名称" :resizable="false">
        <el-table-column prop="name" label="工艺名称" width="200" :resizable="false">
            <template slot-scope="scope">
                <el-tag type="success" class="tag" v-if="scope.row.name != null">02</el-tag>
                <span>{{scope.row.name}}</span>
            </template>  
        </el-table-column>
        <el-table-column prop="device" label="设备名称" :resizable="false">
        <el-table-column prop="device" label="设备名称" width="200" :resizable="false">
            <template slot-scope="scope">
                <el-tag type="info" class="tag" color="#faf2ff" v-if="scope.row.device != null">
                    <span style="color: #e1affb">03</span>
@@ -64,7 +64,7 @@
                <span>{{scope.row.device}}</span>
            </template>
        </el-table-column>
        <el-table-column prop="productFather" label="项目" :resizable="false">
        <el-table-column prop="productFather" label="项目" width="200" :resizable="false">
          <template slot-scope="scope">
                <el-tag type="info" class="tag" v-if="scope.row.productFather != null">04</el-tag>
                <span>{{scope.row.productFather}}</span>
src/components/view/standard-table/target.vue
@@ -7,19 +7,19 @@
        :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
        <el-table-column type="selection" width="55"></el-table-column>
        <el-table-column type="index" width="60" label="序号"></el-table-column>
        <el-table-column prop="tfather" label="工序" :resizable="false">
        <el-table-column prop="tfather" label="工序" width="200" :resizable="false">
            <template slot-scope="scope">
                <el-tag class="tag" type="primary" v-if="scope.row.tfather != null">01</el-tag>
                <span>{{scope.row.tfather}}</span>
            </template>
        </el-table-column>
        <el-table-column prop="tname" label="工艺名称" :resizable="false">
        <el-table-column prop="tname" label="工艺名称" width="200" :resizable="false">
            <template slot-scope="scope">
                <el-tag type="success" v-if="scope.row.tname != null" class="tag">02</el-tag>
                <span>{{scope.row.tname}}</span>
            </template>  
        </el-table-column>
        <el-table-column prop="pfather" label="项目" :resizable="false">
        <el-table-column prop="pfather" label="项目" width="200" :resizable="false">
            <template slot-scope="scope">
                <el-tag type="info" color="#faf2ff" v-if="scope.row.pfather != null" class="tag">
                  <span style="color: #e1affb">03</span>
@@ -27,7 +27,7 @@
                <span>{{scope.row.pfather}}</span>
            </template>  
        </el-table-column>
        <el-table-column prop="pname" label="指标名称" :resizable="false">
        <el-table-column prop="pname" label="指标名称" width="200" :resizable="false">
            <template slot-scope="scope">
                <span>{{scope.row.pname}}</span>
            </template>
@@ -142,7 +142,6 @@
          }).then(res=>{
            this.$message.success(res.message);
          }).catch(error=>{
            this.$message.error(error.message);
          })
        },
      }
src/components/view/standard-table/technology.vue
@@ -10,7 +10,7 @@
            </el-table-column>
            <el-table-column type="index" width="60" label="序号" :resizable="false">
            </el-table-column>
            <el-table-column prop="father" label="工序" :resizable="false">
            <el-table-column prop="father" label="工序" width="200" :resizable="false">
              <template slot-scope="scope">
                    <el-tag class="tag" v-if="scope.row.children" type="primary">01</el-tag>
                    <span style="color: black">
@@ -18,17 +18,17 @@
                    </span>
            </template>
            </el-table-column>
            <el-table-column sortable label="工艺名称" :resizable="false">
            <el-table-column label="工艺名称" width="200" :resizable="false">
              <template slot-scope="scope">
                <el-tag class="tag" type="success" v-if="!scope.row.children">02</el-tag>
                <span style="color: black">{{ scope.row.name  }}</span>
              </template>
            </el-table-column>
            <el-table-column prop="dg" label="设备组" :resizable="false">
            <el-table-column prop="dg" label="设备组" width="200" :resizable="false">
              <template slot-scope="scope">
                <div class="showDiv">
                  <span>{{scope.row.dg}}</span>
                  <div @click="showDialog">选择</div>
                  <div @click="showDialog(scope.row)">选择</div>
                </div>
              </template>
            </el-table-column>
@@ -46,9 +46,18 @@
          title="选择设备组"
          :visible.sync="deviceGroupDialog"
          width="30%">
          <span>这是一段信息</span>
          <el-form :model="formData">
            <el-form-item prop="deviceGroup" label="设备组:"
            :rules="{required:true,message:'设备组不能为空',trigger:'change'}">
                <el-select placeholder="请选择设备组" size="small"
                v-model="formData.deviceGroup">
                <el-option :value="item.father"
                v-for="(item,index) in deviceList" :key="index" :label="item.father"></el-option>
                </el-select>
            </el-form-item>
          </el-form>
          <span slot="footer" class="dialog-footer">
            <el-button type="primary" @click="deviceGroupDialog = false">确 定</el-button>
            <el-button type="primary" @click="confirmUpdate()">确 定</el-button>
            <el-button @click="deviceGroupDialog = false">取 消</el-button>
          </span>
        </el-dialog>
@@ -60,7 +69,12 @@
    data() {
      return {
        deviceGroupDialog:false,
        formData:{
          deviceGroup:''
        },
        row:{},
        selects: [],
        deviceList:[],
        isAllSelect:false,
      }
    },
@@ -69,6 +83,32 @@
    mounted() {
    },
    methods: {
      //工艺路线--获取设备组列表
      getDeviceList(){
        this.$axios.get(this.$api.url.chooseDevice).then(res=>{
          this.deviceList = res.data;
        }).catch(error=>{
          this.$message.error(error.message);
        })
      },
      showDialog(row){
          this.getDeviceList();
          this.formData.deviceGroup = row.dg;
          this.row = row;
          this.deviceGroupDialog = true
      },
      confirmUpdate(){
        this.$axios.post(this.$api.url.writeDevice,{
          id : this.row.id,
          deviceGroup : this.formData.deviceGroup
        }).then(res=>{
          this.$emit("updateDevice",true);
          this.$message.success(res.message);
          this.deviceGroupDialog = false
        }).catch(error=>{
        })
      },
      // 表格树全部选中配置
      // 全选/取消选操作
      //选择某行
@@ -133,9 +173,6 @@
        }
      },
      // 表格树全部选中配置  结束
      showDialog(){
          this.deviceGroupDialog = true
      },
      updatePq(row){
        this.$axios.post(this.$api.url.technologyWrite,{
            id : row.id,
src/components/view/standard.vue
@@ -56,7 +56,7 @@
        </div>
        <div class="contentTable" v-if="this.typeselect == 0">
          <technology @childData="getChildData"  :tableType="tableType" :tableData="tableData"></technology>
          <technology @childData="getChildData" @updateDevice="updateDevice"  :tableType="tableType" :tableData="tableData"></technology>
        </div>
        <div class="contentTable" v-if="this.typeselect == 1">
          <target @childData="getChildData" :tableType="tableType" :tableData="tableData"></target>
@@ -391,6 +391,7 @@
    return {
      //子组件传的id列表
      childIds:[],
      isUpdateDevice:false,
      //工序列表
      fatherList:[],
      deviceList:[],
@@ -505,6 +506,9 @@
    this.selectVersion()
  },
  methods: {
    updateDevice(val){
      this.isUpdateDevice = val;
    },
    changeLeftAdd(){
        if(this.leftAdd.type.length===2){
          this.leftAdd.father=null
@@ -730,6 +734,7 @@
      this.materialVisible = false;
      this.productVisible = false;
    },
    //清空新增bom表单
    clearBomAddModel(){
      if(this.typeselect == 0){
        this.deviceList=[];
@@ -740,6 +745,7 @@
        this.$refs["targetForm"].resetFields();
      }else if(this.typeselect == 2){
        this.mIdList = [];
        this.materialForm.tableList = [];
        this.$refs["materialForm"].resetFields();
      }else{
        this.productDeviceList=[];
@@ -999,7 +1005,6 @@
        let arr = res.data;
        this.formatData(arr)
        this.tableData = arr;
        console.log("arr--",arr);
      })
    },
    formatData(data){
@@ -1119,6 +1124,11 @@
    }
  },
  watch:{
    isUpdateDevice(val){
      if(val){
        this.selectAll();
      }
    },
    search(val) {
        this.$refs.tree.filter(val);
    },