shj
2022-09-20 7df64634d3d7b292713eebfa008c40b3f5f9f65f
src/views/goalManagement/targetEscalation/component/Dailog.vue
@@ -1,46 +1,65 @@
<template>
     <el-dialog
    v-model="dialogVisible"
    title="记录"
    width="50%"
    draggable
  >
   <el-table :data="tableData" style="width: 100%">
    <el-table-column align="center" label="序号" type="index" width="80"/>
    <el-table-column align="center" prop="date" label="责任部门"/>
    <el-table-column align="center" prop="name" label="考核指标"/>
    <el-table-column align="center" prop="address" label="制定部门" />
    <el-table-column align="center" prop="date" label="制定日期" />
    <el-table-column align="center" prop="name" label="检查值" />
    <el-table-column align="center" prop="name" label="检查人" />
    <el-table-column align="center" prop="address" label="检查时间" />
  </el-table>
    <template #footer>
      <span class="dialog-footer">
        <el-button @click="dialogVisible = false">关闭</el-button>
        <el-button type="primary" @click="dialogVisible = false"
          >确定</el-button
        >
      </span>
    </template>
  </el-dialog>
   <el-dialog v-model="dialogVisible" :fullscreen="full" title="查看审批流程" width="50%" draggable>
      <el-button @click="toggleFullscreen" size="small" class="pot" :icon="FullScreen"></el-button>
      <el-table :data="tableData" style="width: 100%">
         <el-table-column property="workName" label="审批人"  sortable></el-table-column>
         <el-table-column property="title" label="审批标题"  sortable></el-table-column>
         <el-table-column property="approvePersonName" label="编写人" sortable></el-table-column>
         <el-table-column property="approveMemo" label="审批意见"  sortable></el-table-column>
      </el-table>
      <template #footer>
         <span class="dialog-footer">
            <el-button @click="dialogVisible = false">关闭</el-button>
            <!-- <el-button type="primary" @click="dialogVisible = false">确定</el-button> -->
         </span>
      </template>
   </el-dialog>
</template>
<script lang="ts">
import { defineComponent,reactive,ref} from 'vue'
import { defineComponent, reactive, ref } from 'vue';
import { FullScreen } from '@element-plus/icons-vue';
import { goalManagementApi } from '/@/api/goalManagement';
export default defineComponent({
    setup() {
        const dialogVisible = ref(false)
        const tableData=ref()
        const openDailog=(data:any)=>{
            dialogVisible.value=true
            tableData.value=data
        }
        return{
        dialogVisible,
        tableData,
        openDailog
        }
    },
})
   setup() {
      const dialogVisible = ref(false);
      const form = ref({
         pageSize: 10,
         pageIndex: 1,
         searchParams: {
            relateId: '', ////检查记录ID
            relateType:"",
            gmtCreate:[],
         },
      });
      const tableData = ref();
      const openDailog = (data: any,type:number) => {
         dialogVisible.value = true;
         form.value.searchParams.relateId=data
         form.value.searchParams.relateType=type
         goalManagementApi().getworkApproveListCode(form.value).then(res=>{
            if(res.data.code==200){
               tableData.value=res.data.data
            }
         })
      };
      //全屏
      const full = ref(false);
      const toggleFullscreen = () => {
         if (full.value == false) {
            full.value = true;
         } else {
            full.value = false;
         }
      };
      return {
         dialogVisible,
         tableData,
         openDailog,
         full,
         toggleFullscreen,
         form,
         FullScreen,
      };
   },
});
</script>