CD配唱片
2025-04-28 910ff5fa58f2e2fa59172a7e483d66b7b3f685b3
提交产能规划的编辑保存取消逻辑
已修改1个文件
51 ■■■■ 文件已修改
src/views/mainPlan/gasPlanning/index.vue 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mainPlan/gasPlanning/index.vue
@@ -32,10 +32,16 @@
    </el-form>
    <div class="box_container">
      <el-row>
        <el-col :span="22" @click="handleCancleStaus">
        <el-col :span="!clickedTableRef?22:20" @click="handleCancleStaus">
          <div class="title_text">管路规划产能</div>
        </el-col>
        <el-col :span="2">
        <el-col :span="1" v-if="!clickedTableRef">
          <el-button
            class="title_btn"
            type="default"
            @click="editRowEvent" >编辑</el-button>
        </el-col>
        <el-col :span="1.8" v-if="clickedTableRef">
          <el-button
            class="title_btn"
            type="primary"
@@ -44,6 +50,12 @@
          >
            保存
          </el-button>
        </el-col>
        <el-col :span="1" v-if="clickedTableRef">
          <el-button
            class="title_btn ml20"
            type="default"
            @click="handleCancleStaus">取消</el-button>
        </el-col>
      </el-row>
@@ -275,10 +287,16 @@
    </div>
    <div class="box_container">
      <el-row>
        <el-col :span="22" @click="handleCancleStausGas">
        <el-col :span="!clickedTableRefGas?22:20" @click="handleCancleStausGas">
          <div class="title_text">气柜规划产能</div>
        </el-col>
        <el-col :span="2">
        <el-col :span="1" v-if="!clickedTableRefGas">
          <el-button
            class="title_btn"
            type="default"
            @click="editRowEventGas" >编辑</el-button>
        </el-col>
        <el-col :span="1.8" v-if="clickedTableRefGas">
          <el-button
            class="title_btn"
            type="primary"
@@ -287,6 +305,12 @@
          >
            保存
          </el-button>
        </el-col>
        <el-col :span="1" v-if="clickedTableRefGas">
          <el-button
            class="title_btn ml20"
            type="default"
            @click="handleCancleStausGas">取消</el-button>
        </el-col>
      </el-row>
      <div class="tabel_container">
@@ -624,12 +648,12 @@
//     return $table.isEditByRow(row);
//   }
// };
// const editRowEvent = (row) => {
//   const $table = tableRef.value;
//   if ($table) {
//     $table.setEditRow(row);
//   }
// };
const editRowEvent = () => {
  clickedTableRef.value = true;
};
const editRowEventGas = () => {
  clickedTableRefGas.value = true;
};
const saveRowEvent = (row) => {
  if (!queryParams.value.date) {
    ElMessage({
@@ -657,9 +681,11 @@
}
const handleCancleStaus = () => {
  clickedTableRef.value = false;
  handleQuery();
};
const handleCancleStausGas = () => {
  clickedTableRefGas.value = false;
  handleQuery();
}
// const cancelRowEvent = () => {
//   const $table = tableRef.value;
@@ -768,12 +794,10 @@
  loading2.value = false;
}
function cellClickEvent({ row, column }) {
  clickedTableRef.value = true;
  row.dayProduceAllNum = row.dayProduceNum * row.personnelNumber;
  row.monthProduceAllNum = row.dayProduceAllNum * row.days;
}
function cellClickEventGas({ row, column }) {
  clickedTableRefGas.value = true;
  row.dayProduceAllNum = row.dayProduceNum * row.personnelNumber;
  row.monthProduceAllNum = row.dayProduceAllNum * row.days;
}
@@ -877,6 +901,9 @@
  }
  .title_btn {
    margin-top: 20px;
    &.ml20{
      margin-left:20px;
    }
  }
  .tabel_container {
    width: 98%;