fuliqi
2025-02-07 25ac1283aaf3a2eb794f89d74bac36480b9270ff
src/views/projectEngineering/projectLibrary/projectDetails.vue
@@ -1,4 +1,5 @@
<template>
  <div>
  <el-card class="card-container">
    <div class="flex-container mb-4">
      <el-tabs v-model="currentTab" @tab-click="handleClick" v-show="isShow">
@@ -29,9 +30,20 @@
      :isShow="isShow"
      class="full-width custom-height"
    />
    <div v-hasRole="['auditor']" v-if="audit" class="button-container">
      <el-button
        class="save-button"
        type="primary"
        @click="saveProject(2)"
      >通过</el-button>
      <el-button
        class="save-button"
        type="danger"
        @click="showDialog"
      >驳回</el-button>
    </div>
    <div v-if="!disabled" class="button-container">
      <el-button
        v-if="componentName.name == 'BasicInfo'"
        class="save-button"
        type="primary"
        @click="saveProject(0)"
@@ -45,6 +57,18 @@
      <!-- <el-button v-else class="cancel-button" @click="cancel">取消</el-button> -->
    </div>
  </el-card>
    <el-dialog :visible.sync="remarkShow" width="1000px" title="驳回信息" append-to-body>
      <el-form ref="form" label-width="80px">
        <el-form-item label="驳回原因">
          <el-input type="textarea" v-model="remark"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="cancelAuditing">取 消</el-button>
        <el-button type="primary" @click="submitAuditing">确 定</el-button>
      </div>
    </el-dialog>
</div>
</template>
<script>
@@ -63,6 +87,9 @@
      isShow: false,
      currentTab: "项目管理基础信息",
      disabled: false,
      remarkShow: false,
      audit: false,
      remark: '',
      projectForm: {},
      componentName: BasicInfo,
      projectId: null,
@@ -102,6 +129,20 @@
    };
  },
  methods: {
    showDialog(){
      this.remark = null;
      this.remarkShow = true;
    },
    cancelAuditing(){
      this.remark = null;
      this.remarkShow = false;
    },
    submitAuditing(){
      this.projectForm.projectInfoForm.remark = this.remark
      this.saveProject(3)
      this.remark = null
      this.remarkShow = false;
    },
    updateIsShow(newValue) {
      this.isShow = newValue;
    },
@@ -135,7 +176,6 @@
    changeTable(index) {
      this.componentName = this.TABS_DATA[index].componentName;
      this.currentTab = this.TABS_DATA[index].value;
    },
    submit(usedStatus) {
      this.$refs.childRef.submit(usedStatus);
@@ -146,7 +186,7 @@
    saveProject(num) {
      this.projectForm.projectInfoForm.usedStatus = num;
      editProject(this.projectForm).then((res) => {
        this.$message.success("保存成功");
        this.$message.success("操作成功");
      })
      this.$router.push('/projectEngineering/project/projectLibrary')
    }
@@ -155,6 +195,7 @@
    if (this.$route.query.disabled) {
      this.disabled = true;
    }
    this.audit = this.$route.query.audit == 1;
  },
};
</script>