Merge remote-tracking branch 'origin/master'
| | |
| | | // 上传成功回调 |
| | | handleUploadSuccess(res, file) { |
| | | if (res.code === 200) { |
| | | this.uploadList.push({ name: res.fileName, url: res.fileName }); |
| | | this.uploadList.push({ name: res.newFileName, originalName: res.originalFilename , url: res.fileName }); |
| | | this.uploadedSuccessfully(); |
| | | } else { |
| | | this.number--; |
| | |
| | | // 删除文件 |
| | | handleDelete(index) { |
| | | this.fileList.splice(index, 1); |
| | | this.$emit("input", this.listToString(this.fileList)); |
| | | // this.$emit("input", this.listToString(this.fileList)); |
| | | //修改为返回数组 |
| | | this.$emit("input", this.fileList); |
| | | }, |
| | | // 上传结束处理 |
| | | uploadedSuccessfully() { |
| | |
| | | this.fileList = this.fileList.concat(this.uploadList); |
| | | this.uploadList = []; |
| | | this.number = 0; |
| | | this.$emit("input", this.listToString(this.fileList)); |
| | | // this.$emit("input", this.listToString(this.fileList)); |
| | | //修改为返回数组 |
| | | this.$emit("input", this.fileList); |
| | | this.$modal.closeLoading(); |
| | | } |
| | | }, |
| | |
| | | <div> |
| | | <div style="display: flex; flex-direction: row; justify-content: center; align-items: center;font-size: 24px"> |
| | | <div>当前流程:</div> |
| | | <div v-if="nowProcessId">{{nowProcessName}}</div> |
| | | <div v-if="nowProcessId">{{selectProcessName}}</div> |
| | | <div v-else>未绑定流程</div> |
| | | </div> |
| | | </div> |
| | |
| | | nowProcessId: { // 当前项目绑定的流程id |
| | | required: true, |
| | | type: String |
| | | }, |
| | | nowProcessName: { |
| | | required: true, |
| | | type: String |
| | | } |
| | | }, |
| | | watch: { |
| | | // 监听回显值 |
| | | nowProcessId(newVal, oldVal) { |
| | | console.log("传入值:", newVal, this.processList) |
| | | this.processList.forEach((item,index) => { |
| | | console.log(item.id, newVal, item.id === newVal) |
| | | if(item.id === newVal){ |
| | | console.log("wwwwwww") |
| | | this.selectProcessId = newVal |
| | | this.$nextTick(() => { |
| | | this.$refs.myTable.toggleRowSelection(item); |
| | | }) |
| | | } |
| | | }) |
| | | projectInfo: { |
| | | handler(newVal, oldVal) { |
| | | console.log("传入值:", newVal, this.processList) |
| | | this.setSelect(this.nowProcessId) |
| | | }, |
| | | deep: true |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | selectProcessId: '', // 组件内部选中的流程id |
| | | selectProcessName: '', // 组件内部选中的流程id |
| | | } |
| | | }, |
| | | methods: { |
| | | setSelect(value) { |
| | | console.log("调用值:", value) |
| | | this.processList.forEach((item,index) => { |
| | | console.log(item.id, value, item.id === value) |
| | | if(item.id === value){ |
| | | this.selectProcessName = item.name |
| | | this.$nextTick(() => { |
| | | this.$refs.myTable.toggleRowSelection(item); |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // 实现el-table单选 |
| | | handleSelectionChange(val) { |
| | | console.log(val, "选中") |
| | | if (val.length > 1) { |
| | | this.$refs.myTable.clearSelection(); |
| | | this.$refs.myTable.toggleRowSelection(val.pop()); |
| | | this.$refs.myTable.toggleRowSelection(val[val.length - 1]); |
| | | } |
| | | if(val.length != 0){ |
| | | this.selectProcessId = val[val.length - 1].id; |
| | | console.log("选中id:", this.selectProcessId) |
| | | } |
| | | }, |
| | | // 启动流程 |
| | |
| | | }) |
| | | }, |
| | | handleClose() { |
| | | this.selectProcessId = "" |
| | | this.selectProcessName = "" |
| | | this.$emit("close") |
| | | } |
| | | } |
| | |
| | | :currentColumns="columns" |
| | | /> |
| | | |
| | | <RunProcess :show="showRunProcess" |
| | | <RunProcess ref="runProcess" :show="showRunProcess" |
| | | :now-process-id="nowProcessId" |
| | | :now-process-name="nowProcessName" |
| | | :project-info="projectRunFrom" |
| | | :process-list="processList" |
| | | @close="closeRunProcess"> |
| | |
| | | processList: [], |
| | | showRunProcess: false, |
| | | nowProcessId: '', |
| | | nowProcessName: '', |
| | | isImportOrExport: false, |
| | | fileDialogVisible: false, |
| | | //是否需要新增按钮(储蓄项目需要) |
| | |
| | | }, |
| | | methods: { |
| | | closeRunProcess() { |
| | | this.projectRunFrom = { |
| | | projectId: null, |
| | | projectName: '' |
| | | } |
| | | this.showRunProcess = false |
| | | this.getList() |
| | | }, |
| | |
| | | // 拿到流程列表 TODO 根据项目类型做筛选 |
| | | getProcessConfigInfoList().then(response => { |
| | | this.processList = response.data; |
| | | this.nowProcessId = row.flowableProcessId; |
| | | // // 防止:id没变不触发监听 |
| | | // this.$refs.runProcess.setSelect(row.flowableProcessId); |
| | | this.projectRunFrom.projectId = row.id; |
| | | this.projectRunFrom.projectName = row.projectName; |
| | | this.nowProcessId = row.flowableProcessId; |
| | | this.nowProcessName = row.flowableProcessName; |
| | | |
| | | this.showRunProcess = true; |
| | | }); |
| | | }, |