lct
Your Name
2022-08-20 52cdea9a329e0835fc30ef8c3ebb7263658cf38d
src/views/goalManagement/safetyAssessment/index.vue
@@ -21,16 +21,39 @@
         </el-row>
      </el-form>
      <div class="minCenter">
         <el-tabs v-model="ruleForm.searchParams.targetType" class="demo-tabs" @tab-click="handleClick">
         <div class="btns">
            <div>
               <el-button size="default" type="primary" :icon="Plus" @click="openD('新建')">新建</el-button>
               <!-- <el-button size="default" type="primary" :icon="Plus" @click="openD('新建')">新建</el-button> -->
            </div>
            <div>
               <!-- <el-button size="default" :icon="Refresh"></el-button> -->
            </div>
         </div>
         <el-tab-pane label="目标定制(年)" name="1"> </el-tab-pane>
            <el-tab-pane label="目标定制(月)" name="2"></el-tab-pane>
            <el-tab-pane label="目标定制(半年)" name="3"></el-tab-pane>
            <el-tab-pane label="目标定制(季度)" name="4"></el-tab-pane>
         </el-tabs>
         <el-table ref="multipleTableRef" :data="tableData" style="width: 100%">
            <el-table-column label="序号" align="center" type="index" width="70" />
            <el-table-column type="expand">
               <template #default="scope">
                  <div class="tableC">
                     <el-tabs v-model="activeNames">
                        <el-tab-pane label="目标指标分解" name="1">
                           <el-table :data="scope.row.targetDivideDetailList" style="width: 100%">
                              <el-table-column align="center" prop="dutyDepartmentName" label="责任部门" />
                              <el-table-column align="center" prop="value" label="考核指标" />
                              <el-table-column align="center" prop="makerDepartmentName" label="制定人部门" />
                              <el-table-column align="center" prop="makeDate" :formatter="timeDate" label="制定日期" />
                              <el-table-column align="center" prop="commitPersonName" label="上报人" />
                           </el-table>
                        </el-tab-pane>
                     </el-tabs>
                  </div>
               </template>
            </el-table-column>
            <el-table-column label="安全目标指标" align="center" property="qName" sortable />
            <el-table-column property="indexNum" align="center" label="考核指标编号" sortable />
            <el-table-column property="year" label="年度" align="center" sortable show-overflow-tooltip />
@@ -38,7 +61,7 @@
            <el-table-column label="操作" align="center" width="300" sortable show-overflow-tooltip>
               <template #default="scope">
                  <el-button link type="primary" size="default" :icon="View" @click="openD('查看', scope.row.id)">查看</el-button>
                  <el-button link type="primary" size="default" :icon="View" @click="openD('修改', scope.row.id)">修改</el-button>
                  <el-button link type="primary" size="default" :icon="View" @click="openD('修改', scope.row.id)">考核</el-button>
                  <!--<el-button link type="primary" size="default" :icon="Delete" @click="onDelete(scope.row.id)">删除</el-button>-->
               </template>
            </el-table-column>
@@ -59,6 +82,7 @@
   </div>
</template>
<script lang="ts">
import { timeDate } from '/@/assets/index.ts';
import Dailog from './component/Dailog.vue';
import { ref, toRefs, reactive, onMounted, defineComponent } from 'vue';
import { ElMessageBox, ElMessage, ElButton, ElInput, TabsPaneContext, FormInstance } from 'element-plus';
@@ -76,7 +100,7 @@
            qName: '', ////安全目标指标
            indexNum: '', ////目标指标编号
            targetType: '1', ////指标类型 1:年指标 2:月指标
            divideStatus: '', ////分解状态 1:已分解 2:未分解
            divideStatus: 1, ////分解状态 1:已分解 2:未分解
         },
      });
      // 重置
@@ -86,7 +110,7 @@
      };
      const listApi = () => {
         goalManagementApi()
            .getTargetMngList(ruleForm)
            .gettargetExamineList(ruleForm)
            .then((res) => {
               if (res.data.code == 200) {
                  tableData.value = res.data.data;
@@ -159,10 +183,12 @@
      // 弹窗
      const openAdd = ref();
      const openD = (title: String, id: number) => {
         openAdd.value.openDailog(title, ruleForm.searchParams.targetType, id);
         openAdd.value.openDailog(title, ruleForm.searchParams.targetType,id);
      };
       const activeNames=ref("1")
      return {
         timeDate,
         activeNames,
         listApi,
         ruleForm,
         resetForm,
@@ -209,4 +235,7 @@
   display: flex;
   justify-content: right;
}
.tableC {
   margin: 0 10%;
}
</style>