| | |
| | | <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </span> |
| | | <span>编制日期: |
| | | <el-date-picker v-model="ratifyInfo.writeDate" style="width:100%" |
| | | type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" size="small" |
| | | placeholder="选择日期"> |
| | | </el-date-picker> |
| | | </span> |
| | | <span>批准人: |
| | | <el-select v-model="ratifyInfo.ratifyUserId" placeholder="请选择" size="small" style="width: 100%"> |
| | | <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </span> |
| | | <span>批准日期: |
| | | <el-date-picker v-model="ratifyInfo.ratifyDate" style="width:100%" |
| | | type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" size="small" |
| | | placeholder="选择日期"> |
| | | </el-date-picker> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="ratifyDialog = false">取 消</el-button> |
| | |
| | | ratifyInfo: { |
| | | writeUserId: '', |
| | | ratifyUserId: '', |
| | | writeDate: '', |
| | | ratifyDate: '', |
| | | }, |
| | | userList: [] |
| | | }; |
| | |
| | | endDate: endDate, |
| | | writeUserId: this.ratifyInfo.writeUserId, |
| | | ratifyUserId: this.ratifyInfo.ratifyUserId, |
| | | writeDate: this.ratifyInfo.writeDate, |
| | | ratifyDate: this.ratifyInfo.ratifyDate, |
| | | } |
| | | this.outLoading = true |
| | | this.$axios.post(this.$api.processMethodSearchNew.exportMethodSearchNew,{ |
| | |
| | | }, |
| | | noQs: true,responseType: "blob"}).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('导出成功') |
| | | const blob = new Blob([res],{ type: 'application/octet-stream' }); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '标准查新导出.xlsx'; |
| | | link.click(); |
| | | //将Blob 对象转换成字符串 |
| | | let reader = new FileReader(); |
| | | reader.readAsText(blob, 'utf-8'); |
| | | reader.onload = () => { |
| | | try { |
| | | let result = JSON.parse(reader.result); |
| | | if (result.message) { |
| | | this.$message.error(result.message); |
| | | } else { |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '标准查新导出.xlsx'; |
| | | link.click(); |
| | | this.$message.success('导出成功') |
| | | } |
| | | } catch (err) { |
| | | console.log(err); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = '标准查新导出.xlsx'; |
| | | link.click(); |
| | | this.$message.success('导出成功') |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // 导入 |