|
@@ -5,18 +5,18 @@
|
|
<el-form :model="tableData.param" ref="queryRef" :inline="true" label-width="100px">
|
|
<el-form :model="tableData.param" ref="queryRef" :inline="true" label-width="100px">
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="8" class="colBlock">
|
|
<el-col :span="8" class="colBlock">
|
|
- <el-form-item label="标题" prop="title">
|
|
|
|
|
|
+ <el-form-item :label="t('message.flowDemo.title')" prop="title">
|
|
<el-input
|
|
<el-input
|
|
v-model="tableData.param.title"
|
|
v-model="tableData.param.title"
|
|
- placeholder="请输入标题"
|
|
|
|
|
|
+ :placeholder="t('message.flowDemo.enterTitle')"
|
|
clearable
|
|
clearable
|
|
@keyup.enter.native="flowDemoList"
|
|
@keyup.enter.native="flowDemoList"
|
|
/>
|
|
/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" class="colBlock">
|
|
<el-col :span="8" class="colBlock">
|
|
- <el-form-item label="审核状态" prop="status">
|
|
|
|
- <el-select v-model="tableData.param.status" placeholder="请选择审核状态" clearable style="width:200px;">
|
|
|
|
|
|
+ <el-form-item :label="t('message.flowDemo.status')" prop="status">
|
|
|
|
+ <el-select v-model="tableData.param.status" :placeholder="t('message.flowDemo.selectStatus')" clearable style="width:200px;">
|
|
<el-option
|
|
<el-option
|
|
v-for="dict in flow_status"
|
|
v-for="dict in flow_status"
|
|
:key="dict.value"
|
|
:key="dict.value"
|
|
@@ -28,8 +28,8 @@
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" class="colBlock">
|
|
<el-col :span="8" class="colBlock">
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-button type="primary" @click="flowDemoList"><el-icon><ele-Search /></el-icon>搜索</el-button>
|
|
|
|
- <el-button @click="resetQuery(queryRef)"><el-icon><ele-Refresh /></el-icon>重置</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="flowDemoList"><el-icon><ele-Search /></el-icon>{{ t('message.flowDemo.search') }}</el-button>
|
|
|
|
+ <el-button @click="resetQuery(queryRef)"><el-icon><ele-Refresh /></el-icon>{{ t('message.flowDemo.reset') }}</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -40,7 +40,7 @@
|
|
type="primary"
|
|
type="primary"
|
|
@click="handleAdd"
|
|
@click="handleAdd"
|
|
v-auth="'api/v1/flow/flowDemo/add'"
|
|
v-auth="'api/v1/flow/flowDemo/add'"
|
|
- ><el-icon><ele-Plus /></el-icon>新增</el-button>
|
|
|
|
|
|
+ ><el-icon><ele-Plus /></el-icon>{{ t('message.flowDemo.add') }}</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
<el-button
|
|
@@ -48,7 +48,7 @@
|
|
:disabled="single"
|
|
:disabled="single"
|
|
@click="handleUpdate(null)"
|
|
@click="handleUpdate(null)"
|
|
v-auth="'api/v1/flow/flowDemo/edit'"
|
|
v-auth="'api/v1/flow/flowDemo/edit'"
|
|
- ><el-icon><ele-Edit /></el-icon>修改</el-button>
|
|
|
|
|
|
+ ><el-icon><ele-Edit /></el-icon>{{ t('message.flowDemo.edit') }}</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
<el-button
|
|
@@ -56,43 +56,43 @@
|
|
:disabled="multiple"
|
|
:disabled="multiple"
|
|
@click="handleDelete(null)"
|
|
@click="handleDelete(null)"
|
|
v-auth="'api/v1/flow/flowDemo/delete'"
|
|
v-auth="'api/v1/flow/flowDemo/delete'"
|
|
- ><el-icon><ele-Delete /></el-icon>删除</el-button>
|
|
|
|
|
|
+ ><el-icon><ele-Delete /></el-icon>{{ t('message.flowDemo.delete') }}</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</div>
|
|
</div>
|
|
<el-table v-loading="loading" :data="tableData.data" @selection-change="handleSelectionChange">
|
|
<el-table v-loading="loading" :data="tableData.data" @selection-change="handleSelectionChange">
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
- <el-table-column label="主键" align="center" prop="id"
|
|
|
|
|
|
+ <el-table-column :label="t('message.flowDemo.primaryKey')" align="center" prop="id"
|
|
min-width="150px"
|
|
min-width="150px"
|
|
/>
|
|
/>
|
|
- <el-table-column label="标题" align="center" prop="title"
|
|
|
|
|
|
+ <el-table-column :label="t('message.flowDemo.titleCol')" align="center" prop="title"
|
|
min-width="150px"
|
|
min-width="150px"
|
|
/>
|
|
/>
|
|
- <el-table-column label="审核状态" align="center" prop="status" min-width="150px">
|
|
|
|
|
|
+ <el-table-column :label="t('message.flowDemo.statusCol')" align="center" prop="status" min-width="150px">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-tag :type="columnColor(scope.row)">{{ statusFormat(scope.row) }}</el-tag>
|
|
<el-tag :type="columnColor(scope.row)">{{ statusFormat(scope.row) }}</el-tag>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="用户id" align="center" prop="createdBy"
|
|
|
|
|
|
+ <el-table-column :label="t('message.flowDemo.userIdCol')" align="center" prop="createdBy"
|
|
min-width="150px"
|
|
min-width="150px"
|
|
/>
|
|
/>
|
|
- <el-table-column label="年龄" align="center" prop="age"
|
|
|
|
|
|
+ <el-table-column :label="t('message.flowDemo.ageCol')" align="center" prop="age"
|
|
min-width="150px"
|
|
min-width="150px"
|
|
/>
|
|
/>
|
|
- <el-table-column label="操作" align="center" class-name="small-padding" min-width="200px" fixed="right">
|
|
|
|
|
|
+ <el-table-column :label="t('message.flowDemo.operation')" align="center" class-name="small-padding" min-width="200px" fixed="right">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
link
|
|
link
|
|
@click="handleView(scope.row)"
|
|
@click="handleView(scope.row)"
|
|
v-auth="'api/v1/flow/flowDemo/get'"
|
|
v-auth="'api/v1/flow/flowDemo/get'"
|
|
- ><el-icon><ele-View /></el-icon>详情</el-button>
|
|
|
|
|
|
+ ><el-icon><ele-View /></el-icon>{{ t('message.flowDemo.detail') }}</el-button>
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
link
|
|
link
|
|
@click="handleUpdate(scope.row)"
|
|
@click="handleUpdate(scope.row)"
|
|
v-auth="'api/v1/flow/flowDemo/edit'"
|
|
v-auth="'api/v1/flow/flowDemo/edit'"
|
|
- ><el-icon><ele-EditPen /></el-icon>修改</el-button>
|
|
|
|
|
|
+ ><el-icon><ele-EditPen /></el-icon>{{ t('message.flowDemo.edit') }}</el-button>
|
|
<el-button
|
|
<el-button
|
|
v-if="scope.row.actionBtn && scope.row.actionBtn.type!='disabled'"
|
|
v-if="scope.row.actionBtn && scope.row.actionBtn.type!='disabled'"
|
|
type="primary"
|
|
type="primary"
|
|
@@ -104,7 +104,7 @@
|
|
link
|
|
link
|
|
@click="handleDelete(scope.row)"
|
|
@click="handleDelete(scope.row)"
|
|
v-auth="'api/v1/flow/flowDemo/delete'"
|
|
v-auth="'api/v1/flow/flowDemo/delete'"
|
|
- ><el-icon><ele-DeleteFilled /></el-icon>删除</el-button>
|
|
|
|
|
|
+ ><el-icon><ele-DeleteFilled /></el-icon>{{ t('message.flowDemo.delete') }}</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -133,6 +133,7 @@
|
|
import checkFlow from "/@/components/gFlow/checkFlow.vue"
|
|
import checkFlow from "/@/components/gFlow/checkFlow.vue"
|
|
import {toRefs, reactive, onMounted, ref, computed,getCurrentInstance,toRaw} from 'vue';
|
|
import {toRefs, reactive, onMounted, ref, computed,getCurrentInstance,toRaw} from 'vue';
|
|
import {ElMessageBox, ElMessage, FormInstance} from 'element-plus';
|
|
import {ElMessageBox, ElMessage, FormInstance} from 'element-plus';
|
|
|
|
+import { useI18n } from 'vue-i18n'
|
|
import {
|
|
import {
|
|
listFlowDemo,
|
|
listFlowDemo,
|
|
delFlowDemo,
|
|
delFlowDemo,
|
|
@@ -145,6 +146,7 @@ import {
|
|
import ApiV1FlowFlowDemoEdit from "/@/views/flow/flowDemo/list/component/edit.vue"
|
|
import ApiV1FlowFlowDemoEdit from "/@/views/flow/flowDemo/list/component/edit.vue"
|
|
import ApiV1FlowFlowDemoDetail from "/@/views/flow/flowDemo/list/component/detail.vue"
|
|
import ApiV1FlowFlowDemoDetail from "/@/views/flow/flowDemo/list/component/detail.vue"
|
|
|
|
|
|
|
|
+const { t } = useI18n()
|
|
const {proxy} = <any>getCurrentInstance()
|
|
const {proxy} = <any>getCurrentInstance()
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
const queryRef = ref()
|
|
const queryRef = ref()
|
|
@@ -160,9 +162,9 @@ const ckFlowRef = ref()
|
|
const word = computed(()=>{
|
|
const word = computed(()=>{
|
|
if(showAll.value === false) {
|
|
if(showAll.value === false) {
|
|
//对文字进行处理
|
|
//对文字进行处理
|
|
- return "展开搜索";
|
|
|
|
|
|
+ return t('message.flowDemo.expandSearch');
|
|
} else {
|
|
} else {
|
|
- return "收起搜索";
|
|
|
|
|
|
+ return t('message.flowDemo.collapseSearch');
|
|
}
|
|
}
|
|
})
|
|
})
|
|
// 字典选项数据
|
|
// 字典选项数据
|
|
@@ -239,26 +241,26 @@ const handleUpdate = (row: FlowDemoTableColumns|null) => {
|
|
editRef.value.openDialog(toRaw(row));
|
|
editRef.value.openDialog(toRaw(row));
|
|
};
|
|
};
|
|
const handleDelete = (row: FlowDemoTableColumns|null) => {
|
|
const handleDelete = (row: FlowDemoTableColumns|null) => {
|
|
- let msg = '你确定要删除所选数据?';
|
|
|
|
|
|
+ let msg = t('message.flowDemo.confirmDeleteSelected');
|
|
let id:number[] = [] ;
|
|
let id:number[] = [] ;
|
|
if(row){
|
|
if(row){
|
|
- msg = `此操作将永久删除数据,是否继续?`
|
|
|
|
|
|
+ msg = t('message.flowDemo.confirmDeleteSingle')
|
|
id = [row.id]
|
|
id = [row.id]
|
|
}else{
|
|
}else{
|
|
id = state.ids
|
|
id = state.ids
|
|
}
|
|
}
|
|
if(id.length===0){
|
|
if(id.length===0){
|
|
- ElMessage.error('请选择要删除的数据。');
|
|
|
|
|
|
+ ElMessage.error(t('message.flowDemo.pleaseSelectDeleteData'));
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- ElMessageBox.confirm(msg, '提示', {
|
|
|
|
- confirmButtonText: '确认',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
|
|
+ ElMessageBox.confirm(msg, t('message.flowDemo.tip'), {
|
|
|
|
+ confirmButtonText: t('message.flowDemo.confirm'),
|
|
|
|
+ cancelButtonText: t('message.flowDemo.cancel'),
|
|
type: 'warning',
|
|
type: 'warning',
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
delFlowDemo(id).then(()=>{
|
|
delFlowDemo(id).then(()=>{
|
|
- ElMessage.success('删除成功');
|
|
|
|
|
|
+ ElMessage.success(t('message.flowDemo.deleteSuccess'));
|
|
flowDemoList();
|
|
flowDemoList();
|
|
})
|
|
})
|
|
})
|
|
})
|