diff --git a/com.actionsoft.apps.coe.pal/src/views/repository/RepositoryInfoVersion.vue b/com.actionsoft.apps.coe.pal/src/views/repository/RepositoryInfoVersion.vue index 029c170..d823e5b 100644 --- a/com.actionsoft.apps.coe.pal/src/views/repository/RepositoryInfoVersion.vue +++ b/com.actionsoft.apps.coe.pal/src/views/repository/RepositoryInfoVersion.vue @@ -114,8 +114,8 @@ > 请选择以{{ currentVersion }}版本为模板创建的新文件版本号:
- 大版本
- 小版本 + {{ largeVersion }}
+ {{ smallVersion }}
确定 @@ -156,6 +156,8 @@ havingVersionManagePerm: false, addNewVersionVisible: false, currentVersion: '', + largeVersion: '', + smallVersion: '', currentId: '', isLargeIteration: true, isOlderVersion: true, @@ -283,6 +285,24 @@ } }, createNewVersion(id, versionNo) {// 复制/创建新版本 + let versionArr = [] + let smallVersionInteger // 小版本整数位 + let smallVersionDecimal // 小版本小数位 + let arr1 = [] // 大版本号 + let arr2 = [] // 以当前版本为大版本的所有小版本 + smallVersionInteger = parseInt(versionNo.match(/\d+\.\d+/g)[0]) + this.tableData.forEach(item => { + versionArr.push(item.versionNo.match(/\d+\.\d+/g)[0].split('.')) // /\d+(.\d+)?/g + }) + versionArr.forEach(item => { + arr1.push(parseInt(item[0])) + if (item[0] == smallVersionInteger) { + arr2.push(parseInt(item[1])) + } + }) + smallVersionDecimal = Math.max(...arr2) + 1 + this.largeVersion = 'V' + (Math.max(...arr1) + 1).toFixed(1) + this.smallVersion = 'V' + smallVersionInteger + '.' + smallVersionDecimal this.addNewVersionVisible = true this.currentVersion = versionNo this.currentId = id