兰宝车间质量管理系统-前端
bleachtred
2024-04-19 44837e975c63bfad67023999fd1128bf8b3bdc95
src/views/workflow/leave/index.vue
@@ -2,7 +2,7 @@
  <div class="p-2">
    <transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
      <div v-show="showSearch" class="search">
        <el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="68px">
        <el-form ref="queryFormRef" :model="queryParams" :inline="true">
          <el-form-item label="请假天数" prop="startLeaveDays">
            <el-input v-model="queryParams.startLeaveDays" placeholder="请输入请假天数" clearable @keyup.enter="handleQuery" />
          </el-form-item>
@@ -51,9 +51,9 @@
        </el-table-column>
        <el-table-column label="请假天数" align="center" prop="leaveDays" />
        <el-table-column label="请假原因" align="center" prop="remark" />
        <el-table-column align="center" prop="businessStatusName" label="流程状态" min-width="70">
        <el-table-column align="center" label="流程状态" min-width="70">
          <template #default="scope">
            <el-tag type="success">{{ scope.row.processInstanceVo.businessStatusName }}</el-tag>
            <dict-tag :options="wf_business_status" :value="scope.row.processInstanceVo.businessStatus"></dict-tag>
          </template>
        </el-table-column>
        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@@ -80,7 +80,7 @@
            >
              <el-button v-hasPermi="['demo:leave:remove']" link type="primary" icon="Delete" @click="handleDelete(scope.row)"></el-button>
            </el-tooltip>
            <el-tooltip placement="top" content="查看" >
            <el-tooltip placement="top" content="查看">
              <el-button link type="primary" icon="View" @click="handleView(scope.row)"></el-button>
            </el-tooltip>
            <el-tooltip v-if="scope.row.processInstanceVo.businessStatus === 'waiting'" content="撤销" placement="top">
@@ -101,7 +101,7 @@
import { LeaveForm, LeaveQuery, LeaveVO } from '@/api/workflow/leave/types';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { wf_business_status } = toRefs<any>(proxy?.useDict('wf_business_status'));
const leaveList = ref<LeaveVO[]>([]);
const loading = ref(true);
const showSearch = ref(true);
@@ -131,7 +131,7 @@
const queryFormRef = ref<ElFormInstance>();
const data = reactive<PageData<LeaveForm, LeaveQuery>>({
  form: {  },
  form: {},
  queryParams: {
    pageNum: 1,
    pageSize: 10,
@@ -175,18 +175,36 @@
const handleAdd = () => {
  proxy.$tab.closePage(proxy.$route);
  proxy.$router.push(`/demo/leaveEdit/index/add/add`);
  proxy.$router.push({
    path: `/demo/leaveEdit/index`,
    query: {
      type: 'add'
    }
  });
};
/** 修改按钮操作 */
const handleUpdate = (row?: LeaveVO) => {
  proxy.$tab.closePage(proxy.$route);
  proxy.$router.push(`/demo/leaveEdit/index/${row.id}/update`);;
  proxy.$router.push({
    path: `/demo/leaveEdit/index`,
    query: {
      id: row.id,
      type: 'update'
    }
  });
};
/** 查看按钮操作 */
const handleView = (row?: LeaveVO) => {
  proxy.$tab.closePage(proxy.$route);
  proxy.$router.push(`/demo/leaveEdit/index/${row.id}/view`);
  proxy.$router.push({
    path: `/demo/leaveEdit/index`,
    query: {
      id: row.id,
      type: 'view'
    }
  });
};
/** 删除按钮操作 */