王震
2023-09-06 2c71f29aded2e3885e210d82dc0d74b834500163
src/components/view/record-content.vue
@@ -166,7 +166,7 @@
               <el-table-column label="操作" width="130">
                  <template slot-scope="scope">
                     <span class="table_do" @click="upContent(scope.row)">编辑&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                     <span class="table_do" @click="deleteRow(scope.$index, tableData)">删除</span>
                     <span class="table_do" @click="deleteRow(scope.$index, scope.row)">删除</span>
                  </template>
               </el-table-column>
            </el-table>
@@ -178,7 +178,7 @@
               <el-col :span="4" style="font-size: 14px;text-align: right;">类型:</el-col>
               <el-col :span="16" :offset="1">
                  <template>
                        <el-select v-model="edit.techFathe" placeholder="请选择类型" style="width: 310px;">
                        <el-select v-model="edit.type" placeholder="请选择类型" style="width: 310px;">
                            <el-option label="橡胶连接器" :value="0"></el-option>
                     <el-option label="金属连接器" :value="1"></el-option>
                     <el-option label="湿插拔电连接器" :value="2"></el-option>
@@ -192,7 +192,9 @@
               <el-col :span="16" :offset="1">
                  <template>
                        <el-select v-model="edit.techFather" 
                  placeholder="请选择类型" style="width: 310px;">
                  placeholder="请选择类型"
                  @change="workevent"
                  style="width: 310px;">
                            <el-option
                            v-for="item in process"
                            :key="item.name"
@@ -207,7 +209,7 @@
               <el-col :span="4" style="font-size: 14px;text-align: right;">工艺:</el-col>
               <el-col :span="16" :offset="1">
                  <template>
                        <el-select v-model="edit.techFathe" placeholder="请选择类型" style="width: 310px;">
                        <el-select v-model="edit.techName" placeholder="请选择类型" style="width: 310px;">
                            <el-option
                            v-for="item in craftapi"
                            :key="item.id"
@@ -387,9 +389,13 @@
            tableData: [],
            upIndex: 0,
            selects: [],
            delete:[],
            typeselect:0,
            upDia: false,
            checkTreeNode:[],
            checkTreeNode:{
               id:2,
            },
            upData:{},
            edit:{
               name:'',
               note:'',
@@ -408,10 +414,11 @@
      },
      mounted() {
         this.selectAllleft()
         this.selectjilu()
      },
      methods: {
         delQueById() {
            this.$axios.get(this.$api.url.chooseTechFath)
            this.$axios.get(this.$api.url.delQueById,)
         },
         childrenClick() {},
         //新增
@@ -459,8 +466,8 @@
                  id:this.upData.id
               }
            }).then(res => {
               this.edit = res.data
               console.log(this.edit);
               this.edit = res.data[0]
               // console.log(this.edit);
            })
         },
         TYpe(val) {
@@ -548,15 +555,38 @@
                  }
               }
            })
            let cc = this.selects.map(el => {
               return el.id
            })
            this.delete = cc.join(',')
            console.log(this.delete);
            this.delAllRecord()
            this.$message.success('删除完成')
         },
         deleteRow(index, rows) {
            rows.splice(index, 1);
         //批量删除
         delAllRecord() {
            this.$axios.post(this.$api.url.delAllRecord,{
                  ids:this.delete
            })
         },
         //删除
         delQueById() {
            this.$axios.post(this.$api.url.delQueById,{
                  id:this.upData.id
            })
         },
         deleteRow(index, rows) {
            this.tableData.splice(index,1)
            this.upData.id = rows.id
            this.delQueById()
         },
         upContent(ob) {
            this.upData = ob
            console.log(this.upData);
            this.selecRecord()
            this.chooseTechFath()
            this.upDia = true
         },
         submitUpData() {