|
@@ -11,9 +11,9 @@
|
|
|
<div class="main-left left" id="left" v-show="!isSlideLeft">
|
|
|
<div class="datasheet_top">
|
|
|
<el-button v-if="permissionBtn.checkPermissionBtn(permissionBtn.etaTablePermission.etaTable_excel)&&sourceMap[$route.path]===1" type="primary" style="margin-right:20px" @click="goAddSheetHandle"
|
|
|
- >添加Excel表格</el-button >
|
|
|
- <el-button v-if="permissionBtn.checkPermissionBtn(permissionBtn.etaTablePermission.etaTable_customize_data_sheetAdd)&&sourceMap[$route.path]===2" type="primary" style="margin-right:20px" @click="goAddSheetHandle">添加时间序列表格</el-button >
|
|
|
- <el-button v-if="permissionBtn.checkPermissionBtn(permissionBtn.etaTablePermission.etaTable_customize_mix_sheetAdd)&&sourceMap[$route.path]===3" type="primary" @click="goAddSheetHandle">添加混合表格</el-button >
|
|
|
+ >{{$t('OnlineExcelPage.add_excel_btn')}}</el-button >
|
|
|
+ <el-button v-if="permissionBtn.checkPermissionBtn(permissionBtn.etaTablePermission.etaTable_customize_data_sheetAdd)&&sourceMap[$route.path]===2" type="primary" style="margin-right:20px" @click="goAddSheetHandle">{{$t('OnlineExcelPage.add_timeline_table_btn')}}</el-button >
|
|
|
+ <el-button v-if="permissionBtn.checkPermissionBtn(permissionBtn.etaTablePermission.etaTable_customize_mix_sheetAdd)&&sourceMap[$route.path]===3" type="primary" @click="goAddSheetHandle">{{$t('OnlineExcelPage.add_mixed_table_btn')}}</el-button >
|
|
|
|
|
|
</div>
|
|
|
<div class="search-cont">
|
|
@@ -23,7 +23,7 @@
|
|
|
:filterable="!search_txt"
|
|
|
remote
|
|
|
clearable
|
|
|
- placeholder="表格名称"
|
|
|
+ :placeholder="$t('OnlineExcelPage.excel_name_ipt')"
|
|
|
style="width: 100%"
|
|
|
:remote-method="searchHandle"
|
|
|
@focus="searchHandle('')"
|
|
@@ -52,7 +52,7 @@
|
|
|
draggable
|
|
|
:expand-on-click-node="false"
|
|
|
check-strictly
|
|
|
- empty-text="暂无分类"
|
|
|
+ :empty-text="$t('Common.no_classify_msg')"
|
|
|
@node-expand="handleNodeExpand"
|
|
|
@node-collapse="handleNodeCollapse"
|
|
|
@current-change="nodeChange"
|
|
@@ -65,7 +65,7 @@
|
|
|
<el-input
|
|
|
ref="editVal"
|
|
|
style="width: 90px"
|
|
|
- placeholder="请输入值"
|
|
|
+ :placeholder="$t('OnlineExcelPage.please_value_ipt')"
|
|
|
class="label-input"
|
|
|
v-model="new_label"
|
|
|
v-if="data.isEdit&&isSheetBtnShow('classifyOpt_edit')"
|
|
@@ -114,7 +114,7 @@
|
|
|
alt=""
|
|
|
style="width: 16px; height: 16px; margin-right: 10px"
|
|
|
/>
|
|
|
- <span>添加表格分类</span>
|
|
|
+ <span>{{$t('OnlineExcelPage.add_category_table_btn')}}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<span
|
|
@@ -139,7 +139,7 @@
|
|
|
<el-input
|
|
|
ref="sheetEditTitRef"
|
|
|
style="width: 400px"
|
|
|
- placeholder="请输入表格名称"
|
|
|
+ :placeholder="$t('OnlineExcelPage.please_table_name_ipt')"
|
|
|
class="label-input"
|
|
|
v-model="sheet_title"
|
|
|
v-if="sheetDetailInfo.isEditTit"
|
|
@@ -157,16 +157,16 @@
|
|
|
{{ sheetDetailInfo.ExcelName }}
|
|
|
</div> -->
|
|
|
<div class="sheet-anothor-info">
|
|
|
- <span class="author">作者:{{ sheetDetailInfo.SysUserRealName }}</span>
|
|
|
+ <span class="author">{{$t('OnlineExcelPage.author_info')}}{{ sheetDetailInfo.SysUserRealName }}</span>
|
|
|
<ul class="action-ul">
|
|
|
- <li style="color:#999999 ;">最近保存时间:{{ saveTime }}</li>
|
|
|
+ <li style="color:#999999 ;">{{$t('OnlineExcelPage.recent_save_time_info')}}{{ saveTime }}</li>
|
|
|
<li
|
|
|
class="editsty"
|
|
|
@click="goEditHandle"
|
|
|
v-if="(sheetDetailInfo.Button && sheetDetailInfo.Button.OpButton&&isSheetBtnShow('edit') && (!onlineExcelEditing))"
|
|
|
>
|
|
|
<img src="~@/assets/img/icons/edit_blue_new.png" v-if="!editButtonText"/>
|
|
|
- <span>{{ editButtonText?editButtonText:'编辑' }}</span>
|
|
|
+ <span>{{ editButtonText?editButtonText:$t('ETable.Btn.edit_btn') }}</span>
|
|
|
</li>
|
|
|
<li
|
|
|
class="editsty"
|
|
@@ -174,7 +174,7 @@
|
|
|
v-if="(sheetDetailInfo.Button && sheetDetailInfo.Button.OpButton&&isSheetBtnShow('save') && onlineExcelEditing)"
|
|
|
>
|
|
|
<img src="~@/assets/img/icons/save_blue_new.png"/>
|
|
|
- <span>保存</span>
|
|
|
+ <span>{{$t('ETable.Btn.save_btn')}}</span>
|
|
|
</li>
|
|
|
<template v-if="[2, 3].includes(sheetDetailInfo.Source)">
|
|
|
<li
|
|
@@ -183,7 +183,7 @@
|
|
|
v-if="sheetDetailInfo.Button.RefreshButton&&isSheetBtnShow('refresh')"
|
|
|
>
|
|
|
<img src="~@/assets/img/icons/refresh_blue_new.png"/>
|
|
|
- <span>刷新</span>
|
|
|
+ <span>{{$t('ETable.Btn.refresh_btn')}}</span>
|
|
|
</li>
|
|
|
<li
|
|
|
class="editsty"
|
|
@@ -191,13 +191,13 @@
|
|
|
v-if="sheetDetailInfo.Button.CopyButton&&isSheetBtnShow('otherSave')"
|
|
|
>
|
|
|
<img src="~@/assets/img/icons/save_as_blue_new.png"/>
|
|
|
- <span>另存为</span>
|
|
|
+ <span>{{$t('ETable.Btn.save_as')}}</span>
|
|
|
</li>
|
|
|
</template>
|
|
|
<li v-if="isSheetBtnShow('download')"
|
|
|
class="editsty" @click="downloadExcel(sheetDetailInfo)">
|
|
|
<img src="~@/assets/img/icons/download_blue.png"/>
|
|
|
- <span>下载</span>
|
|
|
+ <span>{{$t('ETable.Btn.download_btn')}}</span>
|
|
|
</li>
|
|
|
<li
|
|
|
class="deletesty"
|
|
@@ -207,7 +207,7 @@
|
|
|
@click="delSheetHandle({cell:sheetDetailInfo, type:'del'})"
|
|
|
>
|
|
|
<img src="~@/assets/img/icons/delete-red.png"/>
|
|
|
- <span>删除</span>
|
|
|
+ <span>{{$t('ETable.Btn.delete_btn')}}</span>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
@@ -278,7 +278,7 @@
|
|
|
<m-dialog
|
|
|
:show.sync="isSaveOther"
|
|
|
width="650px"
|
|
|
- title="另存为"
|
|
|
+ :title="$t('ETable.Btn.save_as')"
|
|
|
@close="cancelSaveOther"
|
|
|
>
|
|
|
<div style="padding-left: 80px">
|
|
@@ -290,14 +290,14 @@
|
|
|
:model="saveOtherForm"
|
|
|
:rules="saveOtherFormRule"
|
|
|
>
|
|
|
- <el-form-item label="表格名称" prop="name">
|
|
|
+ <el-form-item :label="$t('OnlineExcelPage.excel_name_ipt')" prop="name">
|
|
|
<el-input
|
|
|
v-model="saveOtherForm.name"
|
|
|
style="width: 80%"
|
|
|
- placeholder="请输入表格名称"
|
|
|
+ :placeholder="$t('OnlineExcelPage.please_table_name_ipt')"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="表格分类" prop="classify">
|
|
|
+ <el-form-item :label="$t('OnlineExcelPage.table_classification_label')" prop="classify">
|
|
|
<el-cascader
|
|
|
v-model="saveOtherForm.classify"
|
|
|
:options="classifyOptions"
|
|
@@ -308,7 +308,7 @@
|
|
|
emitPath: false,
|
|
|
}"
|
|
|
style="width: 80%"
|
|
|
- placeholder="请选择所属分类"
|
|
|
+ :placeholder="$t('OnlineExcelPage.select_appropriate_category_lable')"
|
|
|
class="sheet-classify-cascader"
|
|
|
/>
|
|
|
</el-form-item>
|
|
@@ -319,10 +319,10 @@
|
|
|
type="primary"
|
|
|
style="margin-right: 60px"
|
|
|
@click="saveCopyOther"
|
|
|
- >保存</el-button
|
|
|
+ >{{$t('Dialog.confirm_save_btn')}}</el-button
|
|
|
>
|
|
|
<el-button type="primary" plain @click="cancelSaveOther"
|
|
|
- >取消</el-button
|
|
|
+ >{{$t('Dialog.cancel_btn')}}</el-button
|
|
|
>
|
|
|
</div>
|
|
|
</m-dialog>
|
|
@@ -483,7 +483,7 @@ export default {
|
|
|
methods: {
|
|
|
/* 添加表格 */
|
|
|
goAddSheetHandle() {
|
|
|
- if (!this.treeData.length) return this.$message.warning("请先添加表格分类");
|
|
|
+ if (!this.treeData.length) return this.$message.warning(this.$t('OnlineExcelPage.please_table_classification_msg') );
|
|
|
let type = this.sourceMap[this.$route.path];
|
|
|
|
|
|
let path = {
|
|
@@ -549,7 +549,7 @@ export default {
|
|
|
|
|
|
/* 添加一级目录 */
|
|
|
addLevelOneHandle() {
|
|
|
- this.dialog_title = "添加";
|
|
|
+ this.dialog_title = this.$t('ETable.Btn.add_btn') ;
|
|
|
this.classifyForm = {
|
|
|
classify_name: "",
|
|
|
};
|
|
@@ -558,7 +558,7 @@ export default {
|
|
|
|
|
|
/* 编辑节点 */
|
|
|
editNode(node, { ExcelClassifyName, ExcelClassifyId }) {
|
|
|
- this.dialog_title = "编辑";
|
|
|
+ this.dialog_title = this.$t('ETable.Btn.edit_btn');
|
|
|
/* 编辑目录 */
|
|
|
this.classifyForm = {
|
|
|
classify_name: ExcelClassifyName,
|
|
@@ -577,15 +577,15 @@ export default {
|
|
|
const { DeleteStatus } = Data;
|
|
|
|
|
|
DeleteStatus === 1
|
|
|
- ? this.$confirm("该分类下关联表格不可删除", "删除失败", {
|
|
|
- confirmButtonText: "知道了",
|
|
|
+ ? this.$confirm(this.$t('OnlineExcelPage.the_tables_no_delete_msg') , this.$t('MsgPrompt.delete_fail_msg') , {
|
|
|
+ confirmButtonText: this.$t('MsgPrompt.known') ,
|
|
|
showCancelButton: false,
|
|
|
type: "error",
|
|
|
})
|
|
|
: DeleteStatus === 0 && !ExcelInfoId
|
|
|
- ? this.$confirm("确定删除当前分类吗?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
+ ? this.$confirm(this.$t('Chart.OptMsg.classify_del_confirm') , this.$t('Confirm.prompt') , {
|
|
|
+ confirmButtonText: this.$t('Dialog.confirm_btn'),
|
|
|
+ cancelButtonText: this.$t('Dialog.cancel_btn'),
|
|
|
type: "warning",
|
|
|
}).then(() => {
|
|
|
this.delApi(ExcelClassifyId, ExcelInfoId);
|
|
@@ -691,12 +691,12 @@ export default {
|
|
|
luckysheet.exitEditMode();
|
|
|
//结构类型乱飘 强制定义下
|
|
|
let data = {...luckysheet.getAllSheets()[0],status:Number(luckysheet.getAllSheets()[0].status)}
|
|
|
- if (!data.celldata.length) return this.$message.warning("请输入表格内容");
|
|
|
+ if (!data.celldata.length) return this.$message.warning(this.$t('OnlineExcelPage.input_content_msg') );
|
|
|
|
|
|
this.loading = this.$loading({
|
|
|
target: ".dataSheet-container",
|
|
|
lock: true,
|
|
|
- text: "保存中...",
|
|
|
+ text: this.$t('MsgPrompt.saveing_msg') + "...",
|
|
|
spinner: "el-icon-loading",
|
|
|
background: "rgba(255, 255, 255, 0.6)",
|
|
|
});
|
|
@@ -723,10 +723,10 @@ export default {
|
|
|
this.$message.warning(res.Data.Msg)
|
|
|
this.refreshOnlineExcel()
|
|
|
this.onlineExcelEditing=false
|
|
|
- this.editButtonText = `${res.Data.Editor}编辑中`
|
|
|
+ this.editButtonText = `${res.Data.Editor}${this.$t('OnlineExcelPage.editing_msg')}`
|
|
|
return
|
|
|
}
|
|
|
- this.$message.success("保存成功");
|
|
|
+ this.$message.success(this.$t('MsgPrompt.saved_msg') );
|
|
|
this.markFinishStatus()
|
|
|
|
|
|
this.getTreeData();
|
|
@@ -741,7 +741,7 @@ export default {
|
|
|
luckysheet.exitEditMode();
|
|
|
//结构类型乱飘 强制定义下
|
|
|
let data = {...luckysheet.getAllSheets()[0],status:Number(luckysheet.getAllSheets()[0].status)}
|
|
|
- if (!data.celldata.length) return this.$message.warning("请输入表格内容");
|
|
|
+ if (!data.celldata.length) return this.$message.warning(this.$t('OnlineExcelPage.input_content_msg') );
|
|
|
|
|
|
data.luckysheet_select_save = [];
|
|
|
const { ExcelInfoId, ExcelName, ExcelClassifyId } = this.sheetDetailInfo;
|
|
@@ -756,7 +756,7 @@ export default {
|
|
|
this.$message.warning(res.Data.Msg)
|
|
|
this.refreshOnlineExcel()
|
|
|
this.onlineExcelEditing=false
|
|
|
- this.editButtonText = `${res.Data.Editor}编辑中`
|
|
|
+ this.editButtonText = `${res.Data.Editor}${this.$t('OnlineExcelPage.editing_msg') }`
|
|
|
this.autoSaveType=''
|
|
|
return
|
|
|
}
|
|
@@ -814,7 +814,7 @@ export default {
|
|
|
|
|
|
this.sheetDetailInfo = res.Data;
|
|
|
this.saveTime = this.$moment(this.sheetDetailInfo.ModifyTime).format('YYYY-MM-DD HH:mm:ss')||''
|
|
|
- this.editButtonText = this.sheetDetailInfo.CanEdit?'':`${this.sheetDetailInfo.Editor}编辑中`
|
|
|
+ this.editButtonText = this.sheetDetailInfo.CanEdit?'':`${this.sheetDetailInfo.Editor}${this.$t('OnlineExcelPage.editing_msg')}`
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
//sheet组件Mounted已经init一次,再次调用会导致工具栏样式错乱
|
|
@@ -832,9 +832,9 @@ export default {
|
|
|
/* 删除表格 */
|
|
|
delSheetHandle({cell, type = ""}) {
|
|
|
const { ExcelClassifyId, ExcelInfoId } = cell;
|
|
|
- this.$confirm("删除后该表格将不能再引用,确认删除吗?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
+ this.$confirm(this.$t('ETable.Msg.is_del_table_msg') , this.$t('Confirm.prompt') , {
|
|
|
+ confirmButtonText: this.$t('Dialog.confirm_btn'),
|
|
|
+ cancelButtonText: this.$t('Dialog.cancel_btn'),
|
|
|
type: "warning",
|
|
|
})
|
|
|
.then(() => {
|
|
@@ -854,7 +854,7 @@ export default {
|
|
|
3: "/addMixedSheet",
|
|
|
};
|
|
|
if(this.sheetDetailInfo.Source === 1) {
|
|
|
- if(this.editButtonText.indexOf('编辑中')!=-1){
|
|
|
+ if(this.editButtonText.indexOf(this.$t('OnlineExcelPage.editing_msg'))!=-1){
|
|
|
// 编辑中的状态 重新获取最新的详情数据
|
|
|
this.refreshOnlineExcel()
|
|
|
}
|
|
@@ -868,7 +868,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
}else if(res.Data.Status==1){
|
|
|
- this.editButtonText = `${res.Data.Editor}编辑中`
|
|
|
+ this.editButtonText = `${res.Data.Editor}${this.$t('OnlineExcelPage.editing_msg')}`
|
|
|
this.$message.warning('当前'+this.editButtonText)
|
|
|
}
|
|
|
})
|
|
@@ -882,7 +882,7 @@ export default {
|
|
|
});
|
|
|
|
|
|
if (res.Ret !== 200) return;
|
|
|
- this.$message.success("刷新成功");
|
|
|
+ this.$message.success(this.$t('ETable.Msg.refresh_success_msg') );
|
|
|
this.getDetailHandle();
|
|
|
}, 300),
|
|
|
|
|
@@ -914,7 +914,7 @@ export default {
|
|
|
|
|
|
if (res.Ret !== 200) return;
|
|
|
|
|
|
- this.$message.success("保存成功");
|
|
|
+ this.$message.success(this.$t('MsgPrompt.saved_msg') );
|
|
|
this.cancelSaveOther();
|
|
|
this.getTreeData();
|
|
|
},
|