模型转换功能
This commit is contained in:
parent
68e3fd5e81
commit
0237a53ecf
@ -292,7 +292,7 @@
|
|||||||
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange"></el-checkbox>
|
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange"></el-checkbox>
|
||||||
<awsui-button v-if="isOlderVersion ? havingWritePerm : true " style="width: 100px;margin-left: 15px;" class="button-general-color" type="primary" @click="moveFiles">移动至</awsui-button>
|
<awsui-button v-if="isOlderVersion ? havingWritePerm : true " style="width: 100px;margin-left: 15px;" class="button-general-color" type="primary" @click="moveFiles">移动至</awsui-button>
|
||||||
<awsui-button v-if="isOlderVersion ? havingWritePerm : true" style="width: 100px;" class="button-general-color-reverse" plain @click="copyFiles()">创建副本</awsui-button>
|
<awsui-button v-if="isOlderVersion ? havingWritePerm : true" style="width: 100px;" class="button-general-color-reverse" plain @click="copyFiles()">创建副本</awsui-button>
|
||||||
<awsui-button style="width: 100px;" class="button-general-color-reverse" plain @click="openModelConvertDialog('','','batch')">模型转换</awsui-button>
|
<awsui-button v-if="modelConvertDialog.footerBtnVisible" style="width: 100px;" class="button-general-color-reverse" plain @click="openModelConvertDialog('','','batch')">模型转换</awsui-button>
|
||||||
<awsui-button style="width: 100px;" class="button-general-color-reverse" plain @click="exportFiles()">导出</awsui-button>
|
<awsui-button style="width: 100px;" class="button-general-color-reverse" plain @click="exportFiles()">导出</awsui-button>
|
||||||
<awsui-button v-if="isOlderVersion ? havingRemovePerm : true && category != 'itsystem'" style="width: 100px;" class="button-general-color-reverse2" plain @click="removeFiles()">删除</awsui-button>
|
<awsui-button v-if="isOlderVersion ? havingRemovePerm : true && category != 'itsystem'" style="width: 100px;" class="button-general-color-reverse2" plain @click="removeFiles()">删除</awsui-button>
|
||||||
<awsui-button style="width: 100px;" class="button-general-color-reverse3" plain @click="closeFooter">取消</awsui-button>
|
<awsui-button style="width: 100px;" class="button-general-color-reverse3" plain @click="closeFooter">取消</awsui-button>
|
||||||
@ -372,7 +372,7 @@
|
|||||||
:visible.sync="modelConvertDialog.visible"
|
:visible.sync="modelConvertDialog.visible"
|
||||||
:title="modelConvertDialog.title">
|
:title="modelConvertDialog.title">
|
||||||
<div v-if="modelConvertDialog.isSameName">
|
<div v-if="modelConvertDialog.isSameName">
|
||||||
<span>{{ modelConvertDialog.content }}</span>
|
<span v-html="modelConvertDialog.content"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="model-convert-dialog-body" v-else>
|
<div class="model-convert-dialog-body" v-else>
|
||||||
<div>请选择要转换的模型类型:</div>
|
<div>请选择要转换的模型类型:</div>
|
||||||
@ -537,7 +537,8 @@
|
|||||||
content: '',
|
content: '',
|
||||||
repositoryIds: [],
|
repositoryIds: [],
|
||||||
type: '', // single / batch
|
type: '', // single / batch
|
||||||
loading: false
|
loading: false,
|
||||||
|
footerBtnVisible: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -642,19 +643,20 @@
|
|||||||
awsuiAxios.post(data).then(function (ro) {
|
awsuiAxios.post(data).then(function (ro) {
|
||||||
if(ro.result == 'ok') {
|
if(ro.result == 'ok') {
|
||||||
that.modelConvertDialog.loading = false;
|
that.modelConvertDialog.loading = false;
|
||||||
console.log('重名校验',ro);
|
// console.log('重名校验',ro);
|
||||||
if (ro.data.duplicateName) {
|
if (ro.data.duplicateName) {
|
||||||
that.modelConvertDialog.title = '提示';
|
that.modelConvertDialog.title = '提示';
|
||||||
that.modelConvertDialog.isSameName = true;
|
that.modelConvertDialog.isSameName = true;
|
||||||
if (that.modelConvertDialog.type === 'single') {
|
if (that.modelConvertDialog.type === 'single') {
|
||||||
that.modelConvertDialog.content = `【${ro.data.repositoryName}】名称已经存在,是否继续转换生成新的副本`;
|
that.modelConvertDialog.content = `文件【${ro.data.repositoryName}】已经存在,是否继续转换生成新的副本`;
|
||||||
}else if (that.modelConvertDialog.type === 'batch') {
|
}else if (that.modelConvertDialog.type === 'batch') {
|
||||||
let repositoryNames = ro.data.repositoryNames;
|
let repositoryNames = ro.data.repositoryNames;
|
||||||
console.log('重名',repositoryNames);
|
// console.log('重名',repositoryNames);
|
||||||
let content = '';
|
let content = `文件<br/>`;
|
||||||
repositoryNames.forEach(item => {
|
repositoryNames.forEach(item => {
|
||||||
content = `文件【${item}】\n`;
|
content += `【${item}】<br/>`;
|
||||||
});
|
});
|
||||||
|
content += '已经存在,是否继续转换生成新的副本';
|
||||||
that.modelConvertDialog.content = content;
|
that.modelConvertDialog.content = content;
|
||||||
}
|
}
|
||||||
that.modelConvertDialog.duplicateName = ro.data.duplicateName;
|
that.modelConvertDialog.duplicateName = ro.data.duplicateName;
|
||||||
@ -1001,12 +1003,20 @@
|
|||||||
let checkedCount = val.length;
|
let checkedCount = val.length;
|
||||||
that.modelConvertDialog.repositoryIds = [];
|
that.modelConvertDialog.repositoryIds = [];
|
||||||
if (checkedCount > 0) {
|
if (checkedCount > 0) {
|
||||||
|
let flag = false;
|
||||||
val.forEach(item => {
|
val.forEach(item => {
|
||||||
if (that.modelConvertDialog.repositoryIds.indexOf(item.id) === -1){
|
if (that.modelConvertDialog.repositoryIds.indexOf(item.id) === -1){
|
||||||
that.modelConvertDialog.repositoryIds.push(item.id);
|
that.modelConvertDialog.repositoryIds.push(item.id);
|
||||||
}
|
}
|
||||||
|
if (item.methodId !== 'process.epc'){
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
console.log('======',that.modelConvertDialog.repositoryIds);
|
if (flag){
|
||||||
|
that.modelConvertDialog.footerBtnVisible = false;
|
||||||
|
}else {
|
||||||
|
that.modelConvertDialog.footerBtnVisible = true;
|
||||||
|
}
|
||||||
that.showFooter = true;
|
that.showFooter = true;
|
||||||
//控制多选选中后不隐藏
|
//控制多选选中后不隐藏
|
||||||
for (let i = 0; i < checkedCount; i++) {
|
for (let i = 0; i < checkedCount; i++) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user