研发图纸文件管理系统-前端项目
longyvfengyun
2023-11-01 631cbcd80c0dccbcbde31ae5e56c7903229c88ac
新增问题反馈总表页面
5个文件已修改
17797 ■■■■ 已修改文件
src/pages/workplace/apis.js 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/workplace/workplaceList.vue 206 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
yarn.lock 17575 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
流程说明.md 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/workplace/apis.js
@@ -291,3 +291,15 @@
    }
  });
}
export const bomFeedbackListPage = (data, pageNum, pageSize)=>{
  return axios({
    method: "POST",
    url: "bomFeedbak/getListPage",
    data,
    params: {
      pageNum,
      pageSize
    }
  });
}
src/pages/workplace/workplaceList.vue
@@ -1,22 +1,124 @@
<script>
import AdvanceTable from "@/components/table/advance/AdvanceTable";
import {mapGetters} from "vuex";
import moment from "moment";
import {getUserList} from "@/pages/permission/apis";
import {bomFeedbackListPage} from "@/pages/workplace/apis";
export default {
    name: "workplaceList",
    components: {
        AdvanceTable,
    },
    data() {
        let startTime = moment().add(-30, 'day').format("YYYY-MM-DD");
        let endTime = moment().format("YYYY-MM-DD");
        const columns = [
            {
                title: "产品名称",
                dataIndex: "parentName",
                align: "center",
                width: 120
            },
            {
                title: "产品型号",
                dataIndex: "parentModel",
                align: "center",
                width: 300
            },
            {
                title: "定制单号",
                dataIndex: "customCode",
                align: "center",
                width: 120
            },
            {
                title: "版本时间",
                dataIndex: "versionTime",
                align: "center",
                width: 120
            },
            {
                title: "创建人",
                dataIndex: "senderName",
                align: "center",
            },
            {
                title: "创建时间",
                dataIndex: "createTime",
                align: "center",
            },
            {
                title: "反馈接收人",
                dataIndex: "receiverNames",
                align: "center",
            },
            {
                title: "确认人",
                dataIndex: "confirmUserName",
                align: "center",
            },
            {
                title: "回复内容",
                dataIndex: "replyContent",
                align: "center",
            },
            {
                title: "回复时间",
                dataIndex: "replyTime",
                align: "center",
            },
            {
                title: "变更单流水号",
                dataIndex: "ecrNumber",
                align: "center",
            },
            // {
            //     title: "操作",
            //     dataIndex: "operation",
            //     key: "operation",
            //     align: "center",
            //     fixed: "right",
            //     width: 160,
            //     scopedSlots: { customRender: "action" },
            // },
        ];
        return {
            y: 400,
            update: -1,
            spinning: false,
            loading: false,
            pageCurr: 1,
            pageSize: 10,
            pageSize: 20,
            total: 0,
            columns: [],
            columns,
            dataSource: [],
            createTimeRange: [startTime, endTime],
            userName: -1,
            userList: [
                {
                    id: -1,
                    name: "所有人"
                }
            ],
            state: -1,
            stateList: [
                {
                    label: "全部状态",
                    value: -1,
                },
                {
                    label: "未处理",
                    value: 0,
                },
                {
                    label: "已确认",
                    value: 3,
                },
                {
                    label: "已完结",
                    value: 124,
                }
            ],
        }
    },
    watch: {
@@ -62,6 +164,37 @@
        activeFN() {
            this.resize();
        },
        async getUserList() {
            try{
                let res = await getUserList();
                let rs = res.data;
                if(rs.code === 1 && rs.data) {
                    this.userList = rs.data2;
                }
                this.userList.unshift({
                    id: -1,
                    name: "所有人"
                });
            }catch (e) {
                this.userList.unshift({
                    id: -1,
                    name: "全部"
                });
                console.log(e);
            }
        },
        getSearchParams() {
            let startTime = moment(this.createTimeRange[0]).format("YYYY-MM-DD")+" 00:00:00";
            let endTime =  moment(this.createTimeRange[1]).format("YYYY-MM-DD")+" 23:59:59";
            let confirmStatus = this.state;
            let senderId = this.userName;
            return {
                confirmStatus,
                startTime,
                endTime,
                senderId
            };
        },
        rowClassFn(record) {
            let classList = [];
            if (record.enabled == -1) {
@@ -69,10 +202,28 @@
            }
            return classList;
        },
        searchData() {
        async searchData() {
            if (-1 == this.update) {
                this.update = Math.random();
            }
            let params = this.getSearchParams();
            try {
                let res = await bomFeedbackListPage(params, this.pageCurr, this.pageSize);
                let rs = res.data;
                let list = [];
                let total = 0;
                if(rs.code === 1) {
                    list = rs.data.list;
                    total = rs.data.total;
                }
                this.dataSource = list;
                this.total = total;
            }catch (e) {
                this.dataSource = [];
                this.total = 0;
                console.log(e);
            }
        },
        onSearch(conditions, searchOptions) {
            this.pageCurr = 1;
@@ -102,6 +253,7 @@
        ...mapGetters("setting", ["affixed"]),
    },
    mounted() {
        this.getUserList();
        this.searchData();
        window.addEventListener("resize", this.resize);
    },
@@ -142,7 +294,41 @@
              onChange: onPageChange,
              onShowSizeChange: onSizeChange,
            }"
                        :rowClassName="rowClassFn"></advance-table>
                        :rowClassName="rowClassFn">
                        <template slot="title">
                            <a-space class="operator">
                                <span class="title">问题反馈总表</span>
                                <div class="filter-container">
                                    <div class="filter-item">
                                        <span class="filter-label">创建人:</span>
                                        <div class="filter-content">
                                            <a-select style="width: 180px" v-model="userName" @change="searchData">
                                                <a-select-option
                                                    v-for="(item, key) in userList" :key="'key'+key"
                                                    :value="item.id">{{item.name}}</a-select-option>
                                            </a-select>
                                        </div>
                                    </div>
                                    <div class="filter-item">
                                        <span class="filter-label">创建时间:</span>
                                        <div class="filter-content">
                                            <a-range-picker v-model="createTimeRange" @change="searchData"/>
                                        </div>
                                    </div>
                                    <div class="filter-item">
                                        <span class="filter-label">问题反馈状态:</span>
                                        <div class="filter-content">
                                            <a-select style="width: 180px" v-model="state" @change="searchData">
                                                <a-select-option
                                                    v-for="(item, key) in stateList" :key="'key'+key"
                                                    :value="item.value">{{item.label}}</a-select-option>
                                            </a-select>
                                        </div>
                                    </div>
                                </div>
                            </a-space>
                        </template>
                    </advance-table>
                </a-card>
            </a-spin>
        </div>
@@ -162,4 +348,16 @@
        bottom: 0;
    }
}
.filter-container {
    font-size: 14px;
    font-weight: normal;
    margin-left: 16px;
    .filter-item {
        display: inline-block;
        margin-right: 16px;
        .filter-content {
            display: inline-block;
        }
    }
}
</style>
src/router/config.js
@@ -42,7 +42,7 @@
        },
        {
          path: 'workplaceList',
          name: '审批流查询',
          name: '问题反馈查询',
          meta: {
            icon: "profile"
          },
yarn.lock
Diff too large
Á÷³Ì˵Ã÷.md
@@ -1,4 +1,4 @@
#### ä¸€ã€åé¦ˆæµç¨‹å›¾
<p>
<img src="./src/assets/version/img/反馈流程图.png"/>
  <img src="./src/assets/version/img/反馈流程图.png" alt=""/>
</p>