|
@@ -1,18 +1,18 @@
|
|
<template>
|
|
<template>
|
|
<div class="splitpanes-container">
|
|
<div class="splitpanes-container">
|
|
- <el-card shadow="hover" header="表单中心">
|
|
|
|
|
|
+ <el-card shadow="hover" :header="t('message.flowForm.centerTitle')">
|
|
<el-alert
|
|
<el-alert
|
|
- title="用于发起自定义表单审批流程,点击选择左侧表单类型进行表单数据管理"
|
|
|
|
|
|
+ :title="t('message.flowForm.centerIntro')"
|
|
type="success"
|
|
type="success"
|
|
:closable="false"
|
|
:closable="false"
|
|
class="mb15"
|
|
class="mb15"
|
|
></el-alert>
|
|
></el-alert>
|
|
<splitpanes class="default-theme">
|
|
<splitpanes class="default-theme">
|
|
<pane :size="20">
|
|
<pane :size="20">
|
|
- <el-card shadow="hover" header="流程表单">
|
|
|
|
|
|
+ <el-card shadow="hover" :header="t('message.flowForm.centerLeftTitle')">
|
|
<el-table v-loading="loading" :data="tableData.data" @current-change="handleCurrentForm" highlight-current-row>
|
|
<el-table v-loading="loading" :data="tableData.data" @current-change="handleCurrentForm" highlight-current-row>
|
|
<el-table-column prop="id" label="ID" width="100" />
|
|
<el-table-column prop="id" label="ID" width="100" />
|
|
- <el-table-column prop="name" label="表单名称" />
|
|
|
|
|
|
+ <el-table-column prop="name" :label="t('message.flowForm.formName')" />
|
|
</el-table>
|
|
</el-table>
|
|
<pagination
|
|
<pagination
|
|
v-show="tableData.total>0"
|
|
v-show="tableData.total>0"
|
|
@@ -25,14 +25,14 @@
|
|
</el-card>
|
|
</el-card>
|
|
</pane>
|
|
</pane>
|
|
<pane :size="80">
|
|
<pane :size="80">
|
|
- <el-card shadow="hover" :header="'表单数据'+(currentForm.name?('-'+currentForm.name):'')">
|
|
|
|
|
|
+ <el-card shadow="hover" :header="t('message.flowForm.centerRightTitle', { name: currentForm.name||'' })">
|
|
<el-row :gutter="10" class="mb8" v-show="showTablePanel">
|
|
<el-row :gutter="10" class="mb8" v-show="showTablePanel">
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
@click="handleDataAdd"
|
|
@click="handleDataAdd"
|
|
v-auth="'api/v1/flow/flowForm/addFormData'"
|
|
v-auth="'api/v1/flow/flowForm/addFormData'"
|
|
- ><el-icon><ele-Plus /></el-icon>发起表单审批</el-button>
|
|
|
|
|
|
+ ><el-icon><ele-Plus /></el-icon>{{ t('message.flowForm.actionStartApprove') }}</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
<el-button
|
|
@@ -40,7 +40,7 @@
|
|
:disabled="single"
|
|
:disabled="single"
|
|
@click="handleDataUpdate(null)"
|
|
@click="handleDataUpdate(null)"
|
|
v-auth="'api/v1/flow/flowForm/editFormData'"
|
|
v-auth="'api/v1/flow/flowForm/editFormData'"
|
|
- ><el-icon><ele-Edit /></el-icon>修改</el-button>
|
|
|
|
|
|
+ ><el-icon><ele-Edit /></el-icon>{{ t('message.flowForm.edit') }}</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-button
|
|
<el-button
|
|
@@ -48,50 +48,50 @@
|
|
:disabled="multiple"
|
|
:disabled="multiple"
|
|
@click="handleDataDelete(null)"
|
|
@click="handleDataDelete(null)"
|
|
v-auth="'api/v1/flow/flowForm/delFormData'"
|
|
v-auth="'api/v1/flow/flowForm/delFormData'"
|
|
- ><el-icon><ele-Delete /></el-icon>删除</el-button>
|
|
|
|
|
|
+ ><el-icon><ele-Delete /></el-icon>{{ t('message.flowForm.delete') }}</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
- <el-button @click="getFormDataList"><el-icon><ele-Refresh /></el-icon>刷新</el-button>
|
|
|
|
|
|
+ <el-button @click="getFormDataList"><el-icon><ele-Refresh /></el-icon>{{ t('message.flowForm.refresh') }}</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<el-table v-loading="formLoading" :data="tableFormData" @selection-change="handleSelectionChange">
|
|
<el-table v-loading="formLoading" :data="tableFormData" @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.flowForm.primaryKey')" align="center" prop="id"
|
|
min-width="150px"
|
|
min-width="150px"
|
|
/>
|
|
/>
|
|
<el-table-column v-for="(item,index) in fromFields" :key="item.field" :label="item.title" align="center" :prop="item.field"
|
|
<el-table-column v-for="(item,index) in fromFields" :key="item.field" :label="item.title" align="center" :prop="item.field"
|
|
min-width="150px"
|
|
min-width="150px"
|
|
/>
|
|
/>
|
|
- <el-table-column label="状态" align="center" prop="status" min-width="150px">
|
|
|
|
|
|
+ <el-table-column :label="t('message.flowForm.status')" 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="创建时间" align="center" prop="createdAt"
|
|
|
|
|
|
+ <el-table-column :label="t('message.flowForm.createTime')" align="center" prop="createdAt"
|
|
min-width="150px"
|
|
min-width="150px"
|
|
>
|
|
>
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<span>{{ proxy.parseTime(scope.row.created_at, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
<span>{{ proxy.parseTime(scope.row.created_at, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="创建人" align="center" prop="created_user.userNickname"
|
|
|
|
|
|
+ <el-table-column :label="t('message.flowForm.creator')" align="center" prop="created_user.userNickname"
|
|
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.flowForm.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="handleDataView(scope.row)"
|
|
@click="handleDataView(scope.row)"
|
|
v-auth="'api/v1/flow/flowForm/getFormData'"
|
|
v-auth="'api/v1/flow/flowForm/getFormData'"
|
|
- ><el-icon><ele-View /></el-icon>详情</el-button>
|
|
|
|
|
|
+ ><el-icon><ele-View /></el-icon>{{ t('message.flowForm.detail') }}</el-button>
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
link
|
|
link
|
|
@click="handleDataUpdate(scope.row)"
|
|
@click="handleDataUpdate(scope.row)"
|
|
v-auth="'api/v1/flow/flowForm/editFormData'"
|
|
v-auth="'api/v1/flow/flowForm/editFormData'"
|
|
- ><el-icon><ele-EditPen /></el-icon>修改</el-button>
|
|
|
|
|
|
+ ><el-icon><ele-EditPen /></el-icon>{{ t('message.flowForm.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"
|
|
@@ -103,7 +103,7 @@
|
|
link
|
|
link
|
|
@click="handleDataDelete(scope.row)"
|
|
@click="handleDataDelete(scope.row)"
|
|
v-auth="'api/v1/flow/flowForm/delFormData'"
|
|
v-auth="'api/v1/flow/flowForm/delFormData'"
|
|
- ><el-icon><ele-DeleteFilled /></el-icon>删除</el-button>
|
|
|
|
|
|
+ ><el-icon><ele-DeleteFilled /></el-icon>{{ t('message.flowForm.delete') }}</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -146,6 +146,9 @@ import AddFormData from "/@/views/flow/flowForm/list/component/addFormData.vue";
|
|
import {FlowDemoTableColumns} from "/@/views/flow/flowDemo/list/component/model";
|
|
import {FlowDemoTableColumns} from "/@/views/flow/flowDemo/list/component/model";
|
|
import {ElMessage, ElMessageBox} from "element-plus";
|
|
import {ElMessage, ElMessageBox} from "element-plus";
|
|
import DataDetail from "/@/views/flow/flowForm/list/component/dataDetail.vue";
|
|
import DataDetail from "/@/views/flow/flowForm/list/component/dataDetail.vue";
|
|
|
|
+import { useI18n } from 'vue-i18n'
|
|
|
|
+
|
|
|
|
+const { t } = useI18n()
|
|
|
|
|
|
const {proxy} = <any>getCurrentInstance()
|
|
const {proxy} = <any>getCurrentInstance()
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
@@ -272,25 +275,25 @@ const handleStartFlow =(row: FlowDemoTableColumns|null)=>{
|
|
ckFlowRef.value.handleStartFlow(row)
|
|
ckFlowRef.value.handleStartFlow(row)
|
|
}
|
|
}
|
|
const handleDataDelete = (row:any)=>{
|
|
const handleDataDelete = (row:any)=>{
|
|
- let msg = '你确定要删除所选数据?';
|
|
|
|
|
|
+ let msg = t('message.flowForm.confirmDeleteSelected');
|
|
let id:number[] = [] ;
|
|
let id:number[] = [] ;
|
|
if(row){
|
|
if(row){
|
|
- msg = `此操作将永久删除数据,是否继续?`
|
|
|
|
|
|
+ msg = t('message.flowForm.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.flowForm.pleaseSelectDeleteData'));
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- ElMessageBox.confirm(msg, '提示', {
|
|
|
|
- confirmButtonText: '确认',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
|
|
+ ElMessageBox.confirm(msg, t('message.flowForm.tip'), {
|
|
|
|
+ confirmButtonText: t('message.flowForm.confirm'),
|
|
|
|
+ cancelButtonText: t('message.flowForm.cancel'),
|
|
type: 'warning',
|
|
type: 'warning',
|
|
}).then(() => {
|
|
}).then(() => {
|
|
delFlowFormData({formId:currentForm.value.id,ids:id}).then(()=>{
|
|
delFlowFormData({formId:currentForm.value.id,ids:id}).then(()=>{
|
|
- ElMessage.success('删除成功');
|
|
|
|
|
|
+ ElMessage.success(t('message.flowForm.deleteSuccess'));
|
|
getFormDataList();
|
|
getFormDataList();
|
|
})
|
|
})
|
|
}).catch()
|
|
}).catch()
|