|
@@ -2,70 +2,71 @@
|
|
<section >
|
|
<section >
|
|
<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
|
|
<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
|
|
<el-form :inline="true">
|
|
<el-form :inline="true">
|
|
- <el-form-item :label="user.timeType.customDegreeName + '管理'">
|
|
|
|
|
|
+ <el-form-item :label="user.timeType.customDegreeName + $t('guan-li')">
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- <el-link type="primary" :underline="false" @click="intoCenterRatio" class="tanjia">批量导入{{user.timeType.customDegreeName}}</el-link>
|
|
<!-- <el-link type="primary" :underline="false" @click="intoCenterRatio" class="tanjia">批量导入{{user.timeType.customDegreeName}}</el-link>
|
|
<el-link icon="el-icon-circle-plus-outline" type="primary" :underline="false" class="tanjia" @click="addNewSubProject()">添加{{user.timeType.customDegreeName}}</el-link>
|
|
<el-link icon="el-icon-circle-plus-outline" type="primary" :underline="false" class="tanjia" @click="addNewSubProject()">添加{{user.timeType.customDegreeName}}</el-link>
|
|
<el-link type="primary" :underline="false" @click="batchDelete" class="tanjia">批量删除{{user.timeType.customDegreeName}}</el-link> -->
|
|
<el-link type="primary" :underline="false" @click="batchDelete" class="tanjia">批量删除{{user.timeType.customDegreeName}}</el-link> -->
|
|
- <el-link type="primary" :underline="false" @click="batchDelete" class="tanjia">批量删除</el-link>
|
|
|
|
- <el-link type="primary" :underline="false" @click="outoCenterRatio" class="tanjia">数据导出</el-link>
|
|
|
|
- <el-link type="primary" :underline="false" @click="intoCenterRatio" class="tanjia">批量导入</el-link>
|
|
|
|
- <el-link icon="el-icon-circle-plus-outline" type="primary" :underline="false" class="tanjia" @click="addNewSubProject()">新增</el-link>
|
|
|
|
|
|
+ <el-link type="primary" :underline="false" @click="batchDelete" class="tanjia">{{ $t('Batchdelete') }}</el-link>
|
|
|
|
+ <el-link type="primary" :underline="false" @click="outoCenterRatio" class="tanjia">{{ $t('Exportdata') }}</el-link>
|
|
|
|
+ <el-link type="primary" :underline="false" @click="intoCenterRatio" class="tanjia">{{ $t('bulkimport') }}</el-link>
|
|
|
|
+ <el-link icon="el-icon-circle-plus-outline" type="primary" :underline="false" class="tanjia" @click="addNewSubProject()">{{ $t('add') }}</el-link>
|
|
|
|
|
|
</el-form>
|
|
</el-form>
|
|
</el-col>
|
|
</el-col>
|
|
<el-table :data="subProjectList" highlight-current-row v-loading="listLoading" :height="heightDoms" style="width: 100%;" @selection-change="selectionChange">
|
|
<el-table :data="subProjectList" highlight-current-row v-loading="listLoading" :height="heightDoms" style="width: 100%;" @selection-change="selectionChange">
|
|
<el-table-column type="selection"></el-table-column>
|
|
<el-table-column type="selection"></el-table-column>
|
|
- <el-table-column prop="id" width="200" label="序号" align="center">
|
|
|
|
|
|
+ <el-table-column prop="id" width="200" :label="$t('headerTop.serialNumber')" align="center">
|
|
<template slot-scope="scope" >
|
|
<template slot-scope="scope" >
|
|
{{scope.$index + 1}}
|
|
{{scope.$index + 1}}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="name" label="名称" width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column prop="projectNum" label="相关项目数量" width="160">
|
|
|
|
- <template slot-scope="scope">{{scope.row.projectNum + '个'}}</template>
|
|
|
|
|
|
+ <el-table-column prop="name" :label="$t('names')" width="160" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column prop="projectNum" :label="$t('numberofrelatedprojects')" width="160">
|
|
|
|
+ <template slot-scope="scope">{{scope.row.projectNum + $t('ge')}}</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="projects" label="相关项目" min-width="180" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column prop="rmark" label="备注" min-width="180" show-overflow-tooltip></el-table-column>
|
|
|
|
- <el-table-column label="操作" width="170">
|
|
|
|
|
|
+ <el-table-column prop="projects" :label="$t('relatedprojects')" min-width="180" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column prop="rmark" :label="$t('bei-zhu')" min-width="180" show-overflow-tooltip></el-table-column>
|
|
|
|
+ <el-table-column :label="$t('operation')" width="170">
|
|
<template slot-scope="scope" >
|
|
<template slot-scope="scope" >
|
|
- <el-button size="small" type="primary" @click="addNewSubProject(scope.row)">编辑</el-button>
|
|
|
|
- <el-button size="small" type="danger" @click="deleteSubPro(scope.row)">删除</el-button>
|
|
|
|
|
|
+ <el-button size="small" type="primary" @click="addNewSubProject(scope.row)">{{ $t('bian-ji') }}</el-button>
|
|
|
|
+ <el-button size="small" type="danger" @click="deleteSubPro(scope.row)">{{ $t('btn.delete') }}</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
- <el-dialog title="新增/修改维护数据" v-if="addSubProject" :visible.sync="addSubProject" :close-on-click-modal="false" customClass="customWidth" width="600px">
|
|
|
|
|
|
+ <el-dialog :title="$t('addedormodifiedthemaintenancedata')" v-if="addSubProject" :visible.sync="addSubProject" :close-on-click-modal="false" customClass="customWidth" width="600px">
|
|
<el-form ref="form2" :model="addfm" :rules="ruless" label-width="100px">
|
|
<el-form ref="form2" :model="addfm" :rules="ruless" label-width="100px">
|
|
- <el-form-item label="名称" prop="name">
|
|
|
|
- <el-input v-model="addfm.name" placeholder="请输入名称" clearable></el-input>
|
|
|
|
|
|
+ <el-form-item :label="$t('names')" prop="name">
|
|
|
|
+ <el-input v-model="addfm.name" :placeholder="$t('peaseenterthe')" clearable></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="备注">
|
|
|
|
- <el-input type="textarea" :rows="4" placeholder="请输入备注" v-model="addfm.rmark" clearable maxlength="150" show-word-limit> </el-input>
|
|
|
|
|
|
+ <el-form-item :label="$t('bei-zhu')">
|
|
|
|
+ <el-input type="textarea" :rows="4" :placeholder="$t('peaseenterthe')" v-model="addfm.rmark" clearable maxlength="150" show-word-limit> </el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
- <el-button @click.native="addSubProject = false">取消</el-button>
|
|
|
|
- <el-button type="primary" @click="submitInsertSubProject" :loading="addLoading">提交</el-button>
|
|
|
|
|
|
+ <el-button @click.native="addSubProject = false">{{ $t('btn.cancel') }}</el-button>
|
|
|
|
+ <el-button type="primary" @click="submitInsertSubProject" :loading="addLoading">{{ $t('btn.submit') }}</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<!-- 导入结果说明 -->
|
|
<!-- 导入结果说明 -->
|
|
- <el-dialog title="导入结果" v-if="showImportResult" :visible.sync="showImportResult" customClass="customWidth" width="500px">
|
|
|
|
|
|
+ <el-dialog :title="$t('importtheresults')" v-if="showImportResult" :visible.sync="showImportResult" customClass="customWidth" width="500px">
|
|
<div>
|
|
<div>
|
|
<span>{{importResultMsg}}</span>
|
|
<span>{{importResultMsg}}</span>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
- <el-button type="primary" @click="showImportResult=false">确定</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="showImportResult=false">{{ $t('btn.determine') }}</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
- <el-dialog :title="`导入${user.timeType.customDegreeName}数据`" v-if="intoCenterDialog" :visible.sync="intoCenterDialog" customClass="customWidth" width="500px">
|
|
|
|
- <p>1. 下载
|
|
|
|
- <el-link type="primary" style="margin-left:5px;" :underline="false" href="./upload/研究中心导入模板.xlsx" :download="`${user.timeType.customDegreeName}导入模板.xlsx`">{{user.timeType.customDegreeName}}导入模板.xlsx</el-link>
|
|
|
|
|
|
+ <span>{{ $t('importTemplate') }}</span>
|
|
|
|
+ <el-dialog :title="$t('dao-ru') + user.timeType.customDegreeName + $t('shu-ju')" v-if="intoCenterDialog" :visible.sync="intoCenterDialog" customClass="customWidth" width="500px">
|
|
|
|
+ <p>1. {{ $t('other.download') }}
|
|
|
|
+ <el-link type="primary" style="margin-left:5px;" :underline="false" href="./upload/研究中心导入模板.xlsx" :download="user.timeType.customDegreeName+ $t('importTemplate') +'.xlsx'">{{user.timeType.customDegreeName + $t('importTemplate')}}.xlsx</el-link>
|
|
</p>
|
|
</p>
|
|
<!-- <p>2. 填写excel模板,请确保模板中的项目和人员已添加到系统中。</p> -->
|
|
<!-- <p>2. 填写excel模板,请确保模板中的项目和人员已添加到系统中。</p> -->
|
|
<p style="display: flex;justify-content: center;padding:1em 0">
|
|
<p style="display: flex;justify-content: center;padding:1em 0">
|
|
<el-upload ref="upload" action="#" :limit="1" :http-request="batchImportData" :show-file-list="false">
|
|
<el-upload ref="upload" action="#" :limit="1" :http-request="batchImportData" :show-file-list="false">
|
|
- <el-button type="primary" :underline="false" :loading="importingData">开始导入</el-button>
|
|
|
|
|
|
+ <el-button type="primary" :underline="false" :loading="importingData">{{ $t('other.startImporting') }}</el-button>
|
|
</el-upload>
|
|
</el-upload>
|
|
</p>
|
|
</p>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -84,7 +85,7 @@
|
|
},
|
|
},
|
|
addSubProject: false,
|
|
addSubProject: false,
|
|
ruless: {
|
|
ruless: {
|
|
- name: [{ required: true, message: "请输入名称", trigger: "blur" }],
|
|
|
|
|
|
+ name: [{ required: true, message: this.$t('pleaseentername'), trigger: "blur" }],
|
|
},
|
|
},
|
|
heightDoms: document.documentElement.clientHeight - 140,
|
|
heightDoms: document.documentElement.clientHeight - 140,
|
|
intoCenterDialog:false,
|
|
intoCenterDialog:false,
|
|
@@ -102,7 +103,7 @@
|
|
},
|
|
},
|
|
batchDelete(){
|
|
batchDelete(){
|
|
if(this.selectionArr.length == 0){
|
|
if(this.selectionArr.length == 0){
|
|
- this.$message('请选择要删除的' + this.user.timeType.customDegreeName + '数据')
|
|
|
|
|
|
+ this.$message(this.$t('pleaseselectheonesyouwanttodelete') + this.user.timeType.customDegreeName + this.$t('shu-ju'))
|
|
return
|
|
return
|
|
}else{
|
|
}else{
|
|
let nametext = ''
|
|
let nametext = ''
|
|
@@ -110,9 +111,9 @@
|
|
nametext += this.selectionArr[i].name + '、'
|
|
nametext += this.selectionArr[i].name + '、'
|
|
}
|
|
}
|
|
nametext = nametext.substring(0,nametext.length - 1)
|
|
nametext = nametext.substring(0,nametext.length - 1)
|
|
- this.$confirm('确定要批量删除' + this.user.timeType.customDegreeName + '数据:' + nametext + '\u3000吗?','删除',{
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
|
|
+ this.$confirm(this.$t('makesuretodeleteinbatches') + this.user.timeType.customDegreeName + this.$t('shu-ju') +':' + nametext + '\u3000' + $t('ma'),this.$t('btn.delete'),{
|
|
|
|
+ confirmButtonText: this.$t('btn.determine'),
|
|
|
|
+ cancelButtonText: this.$t('btn.cancel'),
|
|
type: 'warning'
|
|
type: 'warning'
|
|
}).then(()=>{
|
|
}).then(()=>{
|
|
let batchIds = ''
|
|
let batchIds = ''
|
|
@@ -125,7 +126,7 @@
|
|
},res => {
|
|
},res => {
|
|
if(res.code == 'ok'){
|
|
if(res.code == 'ok'){
|
|
this.$message({
|
|
this.$message({
|
|
- message: '删除成功',
|
|
|
|
|
|
+ message: this.$t('message.successfullyDeleted'),
|
|
type: 'success'
|
|
type: 'success'
|
|
})
|
|
})
|
|
this.getSub()
|
|
this.getSub()
|
|
@@ -179,7 +180,7 @@
|
|
let format = str[str.length - 1];
|
|
let format = str[str.length - 1];
|
|
if (format != "xls" && format != "xlsx") {
|
|
if (format != "xls" && format != "xlsx") {
|
|
this.$message({
|
|
this.$message({
|
|
- message: "请选择.xls或.xlsx文件",
|
|
|
|
|
|
+ message: this.$t('other.PleaseselecttheXLSorXLSXfile'),
|
|
type: "error"
|
|
type: "error"
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
@@ -193,10 +194,10 @@
|
|
this.showImportResult = true;
|
|
this.showImportResult = true;
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
//换成弹出框,以免有人等了半天回来啥也没看到
|
|
//换成弹出框,以免有人等了半天回来啥也没看到
|
|
- this.importResultMsg = "成功导入/更新"+res.data+"条客户数据。"+(res.msg?res.msg:"");
|
|
|
|
|
|
+ this.importResultMsg = this.$t('importedupdatedsuccessfully')+res.data+this.$t('customersdata')+"。"+(res.msg?res.msg:"");
|
|
this.getSub();
|
|
this.getSub();
|
|
} else {
|
|
} else {
|
|
- this.importResultMsg = "导入失败:"+res.msg;
|
|
|
|
|
|
+ this.importResultMsg = this.$t('export.Importfailure') + ":"+res.msg;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
error => {
|
|
error => {
|
|
@@ -251,9 +252,9 @@
|
|
this.addSubProject = true;
|
|
this.addSubProject = true;
|
|
},
|
|
},
|
|
deleteSubPro(subProject) {
|
|
deleteSubPro(subProject) {
|
|
- this.$confirm("确定要删除这条" + subProject.name + "数据吗?","删除", {
|
|
|
|
- confirmButtonText: "确定",
|
|
|
|
- cancelButtonText: "取消",
|
|
|
|
|
|
+ this.$confirm(this.$t('makesuretodeletethisone') + subProject.name + this.$t('shu-ju'),this.$t('btn.delete'), {
|
|
|
|
+ confirmButtonText: this.$t('btn.determine'),
|
|
|
|
+ cancelButtonText: this.$t('btn.cancel'),
|
|
type: "warning"
|
|
type: "warning"
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
@@ -265,7 +266,7 @@
|
|
this.listLoading = false;
|
|
this.listLoading = false;
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
this.$message({
|
|
this.$message({
|
|
- message: "删除成功",
|
|
|
|
|
|
+ message: this.$t('message.successfullyDeleted'),
|
|
type: "success"
|
|
type: "success"
|
|
});
|
|
});
|
|
this.getSub();
|
|
this.getSub();
|
|
@@ -298,7 +299,7 @@
|
|
this.listLoading = false;
|
|
this.listLoading = false;
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
this.$message({
|
|
this.$message({
|
|
- message: '成功',
|
|
|
|
|
|
+ message: this.$t('other.successful'),
|
|
type: "success"
|
|
type: "success"
|
|
});
|
|
});
|
|
this.addfm = {name: '',rmark: ''}
|
|
this.addfm = {name: '',rmark: ''}
|