| | |
| | | <div class="postfilx"> |
| | | <div class="title">工作进程</div> |
| | | <div style="height: 666px;"> |
| | | <el-steps direction="vertical" :active="actives"> |
| | | <el-steps direction="vertical" :active="workflow"> |
| | | <el-step title="潜在捐献" icon="el-icon-user"> |
| | | <template |
| | | slot="description" |
| | |
| | | |
| | | <script> |
| | | import { |
| | | addDonateannex, |
| | | listDonateannex, |
| | | Modifydonationattachment |
| | | } from "@/api/project/donateannex"; |
| | | import { |
| | | getDonatebaseinfo, |
| | | addDonatebaseinfo, |
| | | updateDonatebaseinfo, |
| | |
| | | accomplishform: {}, |
| | | tableData: [], |
| | | actives: 0, //进程 |
| | | workflow:0, |
| | | loading: false, |
| | | // 保存、终止按钮确认 |
| | | showSaveBtn: true, |
| | |
| | | witnessrules: {}, |
| | | accomplishrules: {}, |
| | | //附件列表 |
| | | donatelist: [], //附件总组 |
| | | potentiallist: [], //潜在附件 |
| | | medicinelist: [], //医学附件 |
| | | affirmlist: [], //确认附件 |
| | | ethiclist: [], //伦理附件 |
| | | registerlist: [], //完成附件 |
| | | fileList: [], |
| | | fileListto: [], |
| | | invoicefileList: [], |
| | |
| | | mounted() { |
| | | // this.id = this.$route.query.id; |
| | | this.Getbasicinformation(); |
| | | this.listDonateannex(); |
| | | }, |
| | | |
| | | methods: { |
| | | // 获取主表数据 |
| | | Getbasicinformation() { |
| | | console.log(this.infoid); |
| | | console.log(this.hintitle); |
| | | // 左侧流程数据 |
| | | getDonatebaseinfoflow(this.infoid).then(res => { |
| | | console.log(res.data); |
| | | this.Processdata = res.data; |
| | | }); |
| | | |
| | | // 表单数据 |
| | | getDonatebaseinfo(this.infoid).then(response => { |
| | | this.form = response.data; |
| | | this.showTerminationBtn = response.data.terminationCase; |
| | | this.actives = response.data.workflow; |
| | | this.workflow=response.data.workflow; |
| | | response.data.sex = parseInt(response.data.sex); |
| | | this.form.id = response.data.id; |
| | | this.form.diseasetype = this.form.diseasetype.split(","); |
| | |
| | | }); |
| | | } |
| | | }, |
| | | // 获取附件数据并分类二级列 |
| | | listDonateannex() { |
| | | let parmi = {}; |
| | | parmi.infoid = this.infoid.toString(); |
| | | listDonateannex(parmi).then(res => { |
| | | this.donatelist = res.rows; |
| | | }); |
| | | // 测试数据 |
| | | const arr = [ |
| | | { type: "type1", name: "saaada" }, |
| | | { type: "type2", name: "ssssda" }, |
| | | { type: "type3", name: "sdddda" }, |
| | | { type: "type4", name: "sdddda" }, |
| | | { type: "type5", name: "sdddda" } |
| | | ]; |
| | | const groupedArr = arr.reduce((accumulator, currentValue) => { |
| | | const key = currentValue.type; |
| | | if (key == "type1") { |
| | | this.potentiallist.push(currentValue); |
| | | } else if (key == "type2") { |
| | | this.medicinelist.push(currentValue); |
| | | } else if (key == "type3") { |
| | | this.affirmlist.push(currentValue); |
| | | } else if (key == "type4") { |
| | | this.ethiclist.push(currentValue); |
| | | } else if (key == "type5") { |
| | | this.registerlist.push(currentValue); |
| | | } |
| | | return accumulator; |
| | | }, {}); |
| | | console.log(this.potentiallist); |
| | | console.log(this.medicinelist); |
| | | }, |
| | | |
| | | /** 保存主表按钮 */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | |
| | | }, |
| | | // 返回上一页 |
| | | cancel() {}, |
| | | // ------------------------票据 |
| | | // ----------------------------------文件 |
| | | // 获取请求头 |
| | | Getnetworkheader() { |
| | | let string = window.location.href; |
| | |
| | | const item = this.invoicefileListto.splice(index, 1)[0]; // 移除指定索引处的元素,并保存到item变量中 |
| | | this.invoicefileListto.splice(index - 1, 0, item); // 将item插入到索引位置的前一位 |
| | | } |
| | | } |
| | | }, |
| | | // 保存 |
| | | saveattachment(stype) {} |
| | | } |
| | | }; |
| | | </script> |