|
@@ -2,8 +2,8 @@
|
|
|
<div class="app-container">
|
|
<div class="app-container">
|
|
|
|
|
|
|
|
<el-col :span="24" class="card-box">
|
|
<el-col :span="24" class="card-box">
|
|
|
- <el-tabs v-model="tabName" type="card" >
|
|
|
|
|
- <el-tab-pane :label="this.$t('cgqpz')" name="tab1">
|
|
|
|
|
|
|
+ <el-tabs v-model="tabName" type="card" @tab-click="handleClick" >
|
|
|
|
|
+ <el-tab-pane v-for="tab in Tabs" :label="$t(tab.name)" :key="tab.id" :name="tab.id">
|
|
|
<el-card style="min-height: 700px ;border-radius: 15px">
|
|
<el-card style="min-height: 700px ;border-radius: 15px">
|
|
|
<el-row :gutter="10" class="mb8">
|
|
<el-row :gutter="10" class="mb8">
|
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
@@ -12,8 +12,8 @@
|
|
|
type="primary"
|
|
type="primary"
|
|
|
icon="el-icon-upload"
|
|
icon="el-icon-upload"
|
|
|
size="mini"
|
|
size="mini"
|
|
|
- @click="handleImport('2')"
|
|
|
|
|
- >{{this.$t('cgqpz')}}{{$t('dr')}}</el-button>
|
|
|
|
|
|
|
+ @click="handleImport()"
|
|
|
|
|
+ >{{$t(tab.name)}}{{$t('dr')}}</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
|
<el-button
|
|
<el-button
|
|
@@ -21,92 +21,13 @@
|
|
|
type="primary"
|
|
type="primary"
|
|
|
icon="el-icon-download"
|
|
icon="el-icon-download"
|
|
|
size="mini"
|
|
size="mini"
|
|
|
- @click="handleExport('2')"
|
|
|
|
|
- >{{this.$t('cgqpz')}}{{$t('dc')}}</el-button>
|
|
|
|
|
|
|
+ @click="handleExport()"
|
|
|
|
|
+ >{{$t(tab.name)}}{{$t('dc')}}</el-button>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
|
|
|
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
|
- <el-tab-pane :label="this.$t('gjyzpz')" name="tab2">
|
|
|
|
|
- <el-card style="min-height: 700px ;border-radius: 15px">
|
|
|
|
|
- <el-row :gutter="10" class="mb8">
|
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
|
- <el-button
|
|
|
|
|
- style=" border-radius: 10px;"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- icon="el-icon-upload"
|
|
|
|
|
- size="mini"
|
|
|
|
|
- @click="handleImport('0')"
|
|
|
|
|
- v-hasPermi="['tool:gen:import']"
|
|
|
|
|
- >{{this.$t('gjyzpz')}}{{$t('dr')}}</el-button>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="primary"
|
|
|
|
|
- style=" border-radius: 10px;background-color: #656B8B"
|
|
|
|
|
- icon="el-icon-download"
|
|
|
|
|
- size="mini"
|
|
|
|
|
- @click="handleExport('0')"
|
|
|
|
|
- v-hasPermi="['system:dict:export']"
|
|
|
|
|
- >{{this.$t('gjyzpz')}}{{$t('dc')}}</el-button>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
-
|
|
|
|
|
- </el-card>
|
|
|
|
|
- </el-tab-pane>
|
|
|
|
|
- <el-tab-pane :label="this.$t('fwglpz')" name="tab3">
|
|
|
|
|
- <el-card style="min-height: 700px ;border-radius: 15px">
|
|
|
|
|
- <el-row :gutter="10" class="mb8">
|
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="primary"
|
|
|
|
|
- style=" border-radius: 10px;"
|
|
|
|
|
- icon="el-icon-upload"
|
|
|
|
|
- size="mini"
|
|
|
|
|
- @click="handleImport('1')"
|
|
|
|
|
- v-hasPermi="['tool:gen:import']"
|
|
|
|
|
- >{{this.$t('fwglpz')}}{{$t('dr')}}</el-button>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="primary"
|
|
|
|
|
- style=" border-radius: 10px;background-color: #656B8B"
|
|
|
|
|
- icon="el-icon-download"
|
|
|
|
|
- size="mini"
|
|
|
|
|
- @click="handleExport('1')"
|
|
|
|
|
- v-hasPermi="['system:dict:export']"
|
|
|
|
|
- >{{this.$t('fwglpz')}}{{$t('dc')}}</el-button>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
- </el-card>
|
|
|
|
|
- </el-tab-pane>
|
|
|
|
|
- <el-tab-pane :label="this.$t('xtpz')" name="tab4">
|
|
|
|
|
- <el-card style="min-height: 700px ;border-radius: 15px">
|
|
|
|
|
- <el-row :gutter="10" class="mb8">
|
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="primary"
|
|
|
|
|
- style=" border-radius: 10px;"
|
|
|
|
|
- icon="el-icon-upload"
|
|
|
|
|
- size="mini"
|
|
|
|
|
- @click="handleImport('3')"
|
|
|
|
|
- v-hasPermi="['tool:gen:import']"
|
|
|
|
|
- >{{this.$t('xtpz')}}{{$t('dr')}}</el-button>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="1.5">
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="primary"
|
|
|
|
|
- style=" border-radius: 10px;background-color: #656B8B"
|
|
|
|
|
- icon="el-icon-download"
|
|
|
|
|
- size="mini"
|
|
|
|
|
- @click="handleExport('3')"
|
|
|
|
|
- v-hasPermi="['system:dict:export']"
|
|
|
|
|
- >{{this.$t('xtpz')}}{{$t('dc')}}</el-button>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </el-row>
|
|
|
|
|
- </el-card>
|
|
|
|
|
- </el-tab-pane>
|
|
|
|
|
</el-tabs>
|
|
</el-tabs>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
@@ -123,7 +44,6 @@
|
|
|
<el-upload
|
|
<el-upload
|
|
|
ref="upload"
|
|
ref="upload"
|
|
|
:limit="1"
|
|
:limit="1"
|
|
|
- accept=".xml"
|
|
|
|
|
:action="upload.url + '?uploadType=' + form.uploadType+'&type=importData&token='+this.usertoken"
|
|
:action="upload.url + '?uploadType=' + form.uploadType+'&type=importData&token='+this.usertoken"
|
|
|
:disabled="upload.isUploading"
|
|
:disabled="upload.isUploading"
|
|
|
:on-progress="handleFileUploadProgress"
|
|
:on-progress="handleFileUploadProgress"
|
|
@@ -135,7 +55,7 @@
|
|
|
<i class="el-icon-upload"></i>
|
|
<i class="el-icon-upload"></i>
|
|
|
<div class="el-upload__text">{{$t('drts')}}<em>{{$t('djsc')}}</em></div>
|
|
<div class="el-upload__text">{{$t('drts')}}<em>{{$t('djsc')}}</em></div>
|
|
|
<div class="el-upload__tip text-center" slot="tip">
|
|
<div class="el-upload__tip text-center" slot="tip">
|
|
|
- <span>{{$t('jyxdr')}}xml{{$t('gswj')}}。</span>
|
|
|
|
|
|
|
+ <!--<span>{{$t('jyxdr')}}xml{{$t('gswj')}}。</span>-->
|
|
|
</div>
|
|
</div>
|
|
|
</el-upload>
|
|
</el-upload>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -197,37 +117,48 @@
|
|
|
isUploading: false,
|
|
isUploading: false,
|
|
|
// 上传的地址
|
|
// 上传的地址
|
|
|
url: window.location.origin+"/pdu/equipmentMintenanceUpload"
|
|
url: window.location.origin+"/pdu/equipmentMintenanceUpload"
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ Tabs:[{"id":"tab1","name":"cgqpz"},{"id":"tab2","name":"gjpz"},{"id":"tab3","name":"fwpz"},{"id":"tab4","name":"xtpz"}],
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
this.usertoken= this.$store.state.user.usertoken;
|
|
this.usertoken= this.$store.state.user.usertoken;
|
|
|
- this.handleQuery();
|
|
|
|
|
|
|
+ //this.handleQuery();
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
handleClick(tab, event) {
|
|
handleClick(tab, event) {
|
|
|
this.tabName=tab.name;
|
|
this.tabName=tab.name;
|
|
|
- alert(tab.name)
|
|
|
|
|
|
|
+ this.upload.open = false;
|
|
|
|
|
+ this.upload.isUploading = false;
|
|
|
|
|
+ if( this.$refs.upload!=undefined){
|
|
|
|
|
+ this.$refs.upload.clearFiles();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
// 导入前校验
|
|
// 导入前校验
|
|
|
beforeAvatarUpload(file) {
|
|
beforeAvatarUpload(file) {
|
|
|
- var name= file.name.split('.')[1].toLowerCase() ;
|
|
|
|
|
- if ( name!='xml' ) {
|
|
|
|
|
- this.$modal.msgError(this.$t('jyxdr')+"xml"+this.$t('gswj'));
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // var name= file.name.split('.')[1].toLowerCase() ;
|
|
|
|
|
+ // if ( name!='xml' ) {
|
|
|
|
|
+ // this.$modal.msgError(this.$t('jyxdr')+"xml"+this.$t('gswj'));
|
|
|
|
|
+ // return false;
|
|
|
|
|
+ // }
|
|
|
},
|
|
},
|
|
|
/** 导入按钮操作 */
|
|
/** 导入按钮操作 */
|
|
|
- handleImport(row) {
|
|
|
|
|
- if(row=='0'){
|
|
|
|
|
|
|
+ handleImport() {
|
|
|
|
|
+ var row="";
|
|
|
|
|
+ if(this.tabName=='tab2'){
|
|
|
this.upload.title = this.$t('gjpz'); // todo
|
|
this.upload.title = this.$t('gjpz'); // todo
|
|
|
- }else if (row=='1'){
|
|
|
|
|
|
|
+ row='0';
|
|
|
|
|
+ }else if (this.tabName=='tab3'){
|
|
|
this.upload.title = this.$t('fwpz'); // todo
|
|
this.upload.title = this.$t('fwpz'); // todo
|
|
|
- }else if (row=='2'){
|
|
|
|
|
|
|
+ row='1';
|
|
|
|
|
+ }else if (this.tabName=='tab1'){
|
|
|
this.upload.title = this.$t('cgqpz'); // todo
|
|
this.upload.title = this.$t('cgqpz'); // todo
|
|
|
- }else if (row=='3'){
|
|
|
|
|
|
|
+ row='2';
|
|
|
|
|
+ }else if (this.tabName=='tab4'){
|
|
|
this.upload.title = this.$t('xtpz'); // todo
|
|
this.upload.title = this.$t('xtpz'); // todo
|
|
|
|
|
+ row='3';
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
this.upload.open = true;
|
|
this.upload.open = true;
|
|
@@ -243,15 +174,25 @@
|
|
|
this.upload.open = false;
|
|
this.upload.open = false;
|
|
|
this.upload.isUploading = false;
|
|
this.upload.isUploading = false;
|
|
|
this.$refs.upload.clearFiles();
|
|
this.$refs.upload.clearFiles();
|
|
|
- this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", $t("drjg"), { dangerouslyUseHTMLString: true });
|
|
|
|
|
- this.getList();
|
|
|
|
|
|
|
+ this.$modal.alert( response.msg);
|
|
|
|
|
+ // this.getList();
|
|
|
},
|
|
},
|
|
|
// 提交上传文件
|
|
// 提交上传文件
|
|
|
submitFileForm() {
|
|
submitFileForm() {
|
|
|
this.$refs.upload.submit();
|
|
this.$refs.upload.submit();
|
|
|
},
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|
|
|
- handleExport(row) {
|
|
|
|
|
|
|
+ handleExport() {
|
|
|
|
|
+ var row="";
|
|
|
|
|
+ if(this.tabName=='tab2'){
|
|
|
|
|
+ row='0';
|
|
|
|
|
+ }else if (this.tabName=='tab3'){
|
|
|
|
|
+ row='1';
|
|
|
|
|
+ }else if (this.tabName=='tab1'){
|
|
|
|
|
+ row='2';
|
|
|
|
|
+ }else if (this.tabName=='tab4'){
|
|
|
|
|
+ row='3';
|
|
|
|
|
+ }
|
|
|
const params={};
|
|
const params={};
|
|
|
params.token=this.usertoken;
|
|
params.token=this.usertoken;
|
|
|
params.export=row;
|
|
params.export=row;
|
|
@@ -277,8 +218,8 @@
|
|
|
this.$modal.confirm(this.$t('sfqztc') + row.userName + this.$t('yhm')).then(function() {
|
|
this.$modal.confirm(this.$t('sfqztc') + row.userName + this.$t('yhm')).then(function() {
|
|
|
return forceLogout(row.tokenId);
|
|
return forceLogout(row.tokenId);
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
- this.getList();
|
|
|
|
|
- this.$modal.msgSuccess(this.$t('qtcg'));
|
|
|
|
|
|
|
+ // this.getList();
|
|
|
|
|
+ this.$modal.msgSuccess(this.$t('qtcg'));
|
|
|
}).catch(() => {});
|
|
}).catch(() => {});
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|