研发图纸文件管理系统-前端项目
longyvfengyun
2022-08-01 dd7d8cb6f26de65ddb2b38b8979738ec142bbf4e
内容修改
2个文件已修改
156 ■■■■ 已修改文件
src/pages/workplace/apis.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/workplace/rejectedList/RejectedList.vue 149 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/workplace/apis.js
@@ -153,11 +153,14 @@
 * 查看分页-已驳回
 * @returns {AxiosPromise}
 */
export const rejectedListPage = ()=>{
export const rejectedListPage = (pageNum, pageSize)=>{
  return axios({
    method: "GET",
    url: "worksheetMain/rejectedListPage",
    params: null
    params: {
      pageNum,
      pageSize
    }
  });
}
src/pages/workplace/rejectedList/RejectedList.vue
@@ -1,16 +1,17 @@
<template>
  <page-toggle-transition v-if="isShow" :disabled="animate.disabled" :animate="animate.name" :direction="animate.direction">
    <advance-table
        :data-source="dataSource"
        :columns="columns"
        :loading="loading"
        title="已驳回"
        row-key="name"
        @search="onSearch"
        @refresh="onRefresh"
        @reset="onReset"
        :format-conditions="true"
        :pagination="{
    <div class="page-content">
      <advance-table
          :data-source="dataSource"
          :columns="columns"
          :loading="loading"
          title="已驳回"
          row-key="beginTime"
          @search="onSearch"
          @refresh="onRefresh"
          @reset="onReset"
          :format-conditions="true"
          :pagination="{
        current: page,
        pageSize: pageSize,
        total: total,
@@ -21,12 +22,19 @@
        onChange: onPageChange,
        onShowSizeChange: onSizeChange,
      }">
      <template slot="action" slot-scope="scope">
        <a @click="scope.record">下载</a>
        <a-divider type="vertical"></a-divider>
        <a @click="scope.record">详情</a>
      </template>
    </advance-table>
        <template slot="action" slot-scope="scope">
          <a @click="show(scope)">详情</a>
        </template>
      </advance-table>
      <a-modal
          v-model="workDetailVisible"
          :title="workDetailTitle"
          centered
          :footer="false"
          :width="1300">
        <draw-upload :list="subList" no-footer></draw-upload>
      </a-modal>
    </div>
  </page-toggle-transition>
</template>
@@ -34,11 +42,17 @@
import PageToggleTransition from "@/components/transition/PageToggleTransition";
import AdvanceTable from "@/components/table/advance/AdvanceTable";
import {mapState} from "vuex";
import {rejectedListPage, linkInfo} from "@/pages/workplace/apis";
import DrawUpload from "@/pages/components/drawUpload/DrawUpload";
import AuditForm from "@/pages/workplace/workForm/auditForm";
export default {
  name: "RejectedList",
  components: {
    DrawUpload,
    PageToggleTransition,
    AdvanceTable,
    AuditForm,
  },
  props: {
    isShow: {
@@ -56,34 +70,42 @@
  data() {
    return {
      loading: false,
      workDetailVisible: false,
      auditFormVisible: false,
      page: 1,
      pageSize: 10,
      total: 100,
      total: 0,
      conditions: {},
      columns: [
        {
          title: '图纸编码',
          dataIndex: 'name',
          key: 'name',
          align: "center",
          searchAble: true
          title: '工单标题',
          dataIndex: 'title',
          key: 'title',
          align: "center"
        },
        {
          title: '图纸类型',
          dataIndex: 'type',
          key: 'type',
          align: "center",
          searchAble: true,
          dataType: 'select',
          search: {
            selectOptions: []
          }
          title: '工单描述',
          dataIndex: 'description',
          key: 'description',
          align: "center"
        },
        {
          title: '上传日期',
          dataIndex: 'uploadDate',
          key: 'uploadDate',
          align: "center",
          title: '工单结束原因',
          dataIndex: 'endReason',
          key: 'endReason',
          align: "center"
        },
        {
          title: '创建日期',
          dataIndex: 'beginTime',
          key: 'beginTime',
          align: "center"
        },
        {
          title: '结束日期',
          dataIndex: 'endTime',
          key: 'endTime',
          align: "center"
        },
        {
          title: '操作',
@@ -91,19 +113,50 @@
          key: 'operation',
          align: "center",
          fixed: 'right',
          width: 100,
          scopedSlots: { customRender: 'action' }
        },
      ],
      dataSource: [],
      title: "",
      subList: [],
      formData: {
        id: 0,    // 连接id
        mainId: 0,    // 主id
        linkStatus: 1,    // 审批状态 1:通过,2:驳回
        dealReason: "",   // 审核建议
        nextUser: 0,    // 下一个审核的用户id
      }
    }
  },
  methods: {
    show(scope) {
      console.log(scope);
      let record = scope.record;
      this.title = record.title;
      this.searchBomList(record.id);
    },
    searchBomList(id) {
      let loading = this.$layer.loading();
      linkInfo(id).then(res=>{
        this.$layer.close(loading);
        let rs = res.data;
        let rsData = rs.data;
        let data = [];
        if(rs.code == 1) {
          data = rsData.approvingBomList;
        }
        this.subList = data;
        this.workDetailVisible = true;
        // 设置审核表单
        this.formData.id = rsData.links[rsData.links.length-1].id;
        this.formData.mainId = rsData.id;
      }).catch(error=>{
        console.log(error);
        this.$layer.close(loading);
      });
    },
    onSearch(conditions, searchOptions) {
      console.log(conditions);
      console.log(searchOptions);
      this.page = 1
      this.conditions = conditions
      this.searchData();
@@ -127,11 +180,27 @@
      this.searchData()
    },
    searchData() {
      console.log("查询后台返回参数");
      rejectedListPage(this.page, this.pageSize).then(res=>{
        let rs = res.data;
        let data = [];
        if(rs.code == 1) {
          data = rs.data.list.map(item=>{
            return item;
          });
        }
        this.total = rs.data.total;
        this.dataSource = data;
      });
    },
  },
  computed: {
    ...mapState('setting', ['animate']),
    workDetailTitle() {
      return this.title;
    },
  },
  mounted() {
    this.searchData();
  }
}
</script>