import { getFlowChartStatus } from "@/api/permission-selfhelp-manage";
export default {
    name: 'process-status',
    // 接收父页面传过来的属性
    props: {
        applyOrdNo:[Number, String]
    },
    // 页面数据绑定
    data() {
        return {
            options: [
                { operateState: 0, icon: "el-icon-success", color: "#67c23a", name: "已办" },
                { operateState: 1, icon: "el-icon-warning", color: "#f04134", name: "未办" },
                { operateState: 2, icon: "icon iconfont iconf-timel", color: "#ffa32c", name: "已提交" }
            ],
            // 展开的id集合
            expandAll: [],
            tableData: []
        };
    },
    components: {},
    computed: {},
    methods: {
        /**
         * 展开全部
         */
        handlexpandAll() {
            if (this.expandAll.length === 0) {
                this.tableData.forEach(item => {
                    this.expandAll.push(item.id)
                });
            } else {
                this.expandAll = []
            }

        }
    },
    created() {
        getFlowChartStatus(this.applyOrdNo).then(res => {
            this.tableData = res.data.content.map((item, index) => {
                return {
                    ...item,
                    id: index
                }
            });
        })

    },
    mounted() {},
}