workFrame.js 3.04 KB

// 时间戳转化
// export default {
//     timestampToTime(timestamp) {
//         let strDate;
//         var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
//         var Y = date.getFullYear() + '-';
//         var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
//         var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ';
//         var h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
//         var m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes());
//         strDate = Y + M + D + h + m;
//         return strDate;
//     },
// }


//流程环节操作按钮
export function operation(index, item) {
    let that = this;
    switch (item.value) {
        case "zsyl":
            this.zsylFlag = true;
            break;
        case "clfp":
            this.key++;
            this.issplitScreen = !this.issplitScreen;
            this.flag = !this.flag;
            if (this.issplitScreen) {
                this.tabList.splice(1, 1);
            } else {
                this.tabList = [...this.tabList1];
            }
            break;
        case "th":
            this.thflag = true;
            this.$nextTick(() => {
                this.$refs.thdialogRef.tablelistFn();
            });
            break;
        case "zc":
            this.zcDialog = true;
            this.$refs.zcDialogRef.tablelistFn();
            break;
        case "tc":
            window.close();
            break;
        case "db":
            var formdata = new FormData();
            formdata.append("bsmSlsq", this.bsmSlsq);
            formdata.append("bestepid", this.bestepid);
            // comMsg;
            this.$confirm("请确认是否登簿", "提示", {
                iconClass: "el-icon-question", //自定义图标样式
                confirmButtonText: "确认", //确认按钮文字更换
                cancelButtonText: "取消", //取消按钮文字更换
                showClose: true, //是否显示右上角关闭按钮
                type: "warning", //提示类型  success/info/warning/error
            }).then(function () {
                record(formdata).then((res) => {
                    if (res.code === 200 || res.code === 2002) {
                        that.$alert(res.message);
                    }
                });
            });
            break;
    }
}

export function loadBdcdylist(that) {
    var formdata = new FormData();
    formdata.append("bsmSlsq", that.bsmSlsq);
    formdata.append("bestepid", that.bestepid);
    leftMenu(formdata).then((res) => {
        if (res.code === 200) {
            that.unitData = res.result;
            that.currentSelectProps = res.result[0];
            //debugger;
            //this.$alert(res.result[0].bsmSldy);
            // setTimeout(() => {
            //   that.$refs.slxx?.[0].list(that.unitData?.[0]?.bsmSldy);
            //   this.bsmBusiness = that.unitData?.[0]?.bsmBusiness;
            // }, 300);
        }
    });
}