|
@@ -2,7 +2,7 @@
|
|
<div>
|
|
<div>
|
|
<BasicTable @register="registerTable">
|
|
<BasicTable @register="registerTable">
|
|
<template #toolbar>
|
|
<template #toolbar>
|
|
- <a-button type="primary" @click="handleEdit">授权</a-button>
|
|
|
|
|
|
+ <a-button type="primary" @click="handleEdit">{{t('routes.empower.sq')}}</a-button>
|
|
</template>
|
|
</template>
|
|
<template #copy="{ record }">
|
|
<template #copy="{ record }">
|
|
<a @click="handleCopy(record.authorizeKey)">
|
|
<a @click="handleCopy(record.authorizeKey)">
|
|
@@ -13,12 +13,12 @@
|
|
<TableAction
|
|
<TableAction
|
|
:actions="[
|
|
:actions="[
|
|
{
|
|
{
|
|
- label: '编辑',
|
|
|
|
|
|
+ label: t('common.edit'),
|
|
//ifShow: getCheckPerm('algorithm-updata'),
|
|
//ifShow: getCheckPerm('algorithm-updata'),
|
|
onClick: handleEdit.bind(null, record),
|
|
onClick: handleEdit.bind(null, record),
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- label: '删除',
|
|
|
|
|
|
+ label: t('common.delText'),
|
|
color: 'error',
|
|
color: 'error',
|
|
//ifShow: getCheckPerm('algorithm-delete'),
|
|
//ifShow: getCheckPerm('algorithm-delete'),
|
|
onClick: handleDelete.bind(null, record),
|
|
onClick: handleDelete.bind(null, record),
|
|
@@ -42,12 +42,12 @@
|
|
} from '/@/components/Table';
|
|
} from '/@/components/Table';
|
|
import { authorizeModelingList, authorizeModelingdelete } from '/@/api/authorizeModeling';
|
|
import { authorizeModelingList, authorizeModelingdelete } from '/@/api/authorizeModeling';
|
|
import { useModal } from '/@/components/Modal';
|
|
import { useModal } from '/@/components/Modal';
|
|
- import { useI18n } from '/@/hooks/web/useI18n';
|
|
|
|
import { copyTextToClipboard } from '/@/hooks/web/useCopyToClipboard';
|
|
import { copyTextToClipboard } from '/@/hooks/web/useCopyToClipboard';
|
|
import { Time } from '/@/components/Time';
|
|
import { Time } from '/@/components/Time';
|
|
import AddModal from './AddModal.vue';
|
|
import AddModal from './AddModal.vue';
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
// import { usePermissionStore } from '/@/store/modules/permission';
|
|
// import { usePermissionStore } from '/@/store/modules/permission';
|
|
|
|
+ import { useI18n } from '/@/hooks/web/useI18n';
|
|
import { incrementUseTypeList } from '/@/api/account';
|
|
import { incrementUseTypeList } from '/@/api/account';
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
components: {
|
|
components: {
|
|
@@ -57,14 +57,14 @@
|
|
Time,
|
|
Time,
|
|
},
|
|
},
|
|
setup() {
|
|
setup() {
|
|
- const { t } = useI18n();
|
|
|
|
const { createMessage, createConfirm } = useMessage();
|
|
const { createMessage, createConfirm } = useMessage();
|
|
// const permissionStore = usePermissionStore();
|
|
// const permissionStore = usePermissionStore();
|
|
// const { getCheckPerm } = permissionStore;
|
|
// const { getCheckPerm } = permissionStore;
|
|
|
|
+ const { t } = useI18n();
|
|
const [register, { openModal }] = useModal();
|
|
const [register, { openModal }] = useModal();
|
|
const columns: BasicColumn[] = [
|
|
const columns: BasicColumn[] = [
|
|
{
|
|
{
|
|
- title: '客户账号',
|
|
|
|
|
|
+ title: t('routes.empower.customerName'),
|
|
dataIndex: 'customerName',
|
|
dataIndex: 'customerName',
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
width: 250,
|
|
width: 250,
|
|
@@ -79,17 +79,17 @@
|
|
// },
|
|
// },
|
|
// },
|
|
// },
|
|
{
|
|
{
|
|
- title: '终端客户',
|
|
|
|
|
|
+ title: t('routes.empower.endCustomer'),
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
dataIndex: 'endCustomer',
|
|
dataIndex: 'endCustomer',
|
|
width: 120,
|
|
width: 120,
|
|
},
|
|
},
|
|
- {
|
|
|
|
- title: '使用类型',
|
|
|
|
- ellipsis: true,
|
|
|
|
- dataIndex: 'useTypeStr',
|
|
|
|
- width: 120,
|
|
|
|
- },
|
|
|
|
|
|
+ // {
|
|
|
|
+ // title: t('routes.empower.useTypeStr'),
|
|
|
|
+ // ellipsis: true,
|
|
|
|
+ // dataIndex: 'useTypeStr',
|
|
|
|
+ // width: 120,
|
|
|
|
+ // },
|
|
// {
|
|
// {
|
|
// title: '项目号',
|
|
// title: '项目号',
|
|
// ellipsis: true,
|
|
// ellipsis: true,
|
|
@@ -97,14 +97,14 @@
|
|
// width: 120,
|
|
// width: 120,
|
|
// },
|
|
// },
|
|
{
|
|
{
|
|
- title: '算法授权Key',
|
|
|
|
|
|
+ title: t('routes.empower.authorizeKey'),
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
slots: { customRender: 'copy' },
|
|
slots: { customRender: 'copy' },
|
|
dataIndex: 'authorizeKey',
|
|
dataIndex: 'authorizeKey',
|
|
width: 120,
|
|
width: 120,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '授权期限',
|
|
|
|
|
|
+ title: t('routes.empower.authorizeTime'),
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
dataIndex: 'authorizeTime',
|
|
dataIndex: 'authorizeTime',
|
|
width: 220,
|
|
width: 220,
|
|
@@ -116,25 +116,25 @@
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '授权说明',
|
|
|
|
|
|
+ title: t('routes.empower.remark'),
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
dataIndex: 'remark',
|
|
dataIndex: 'remark',
|
|
width: 120,
|
|
width: 120,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '经销商名称',
|
|
|
|
|
|
+ title: t('routes.empower.agentName'),
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
dataIndex: 'agentName',
|
|
dataIndex: 'agentName',
|
|
width: 120,
|
|
width: 120,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '创建人',
|
|
|
|
|
|
+ title: t('routes.retailer.createName'),
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
dataIndex: 'createAgentName',
|
|
dataIndex: 'createAgentName',
|
|
width: 120,
|
|
width: 120,
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- title: '创建时间',
|
|
|
|
|
|
+ title: t('routes.retailer.createTime'),
|
|
ellipsis: true,
|
|
ellipsis: true,
|
|
dataIndex: 'createTime',
|
|
dataIndex: 'createTime',
|
|
width: 160,
|
|
width: 160,
|
|
@@ -155,7 +155,7 @@
|
|
schemas: [
|
|
schemas: [
|
|
{
|
|
{
|
|
field: 'customerName',
|
|
field: 'customerName',
|
|
- label: '客户账号',
|
|
|
|
|
|
+ label: t('routes.empower.customerName'),
|
|
component: 'Input',
|
|
component: 'Input',
|
|
colProps: {
|
|
colProps: {
|
|
xl: 8,
|
|
xl: 8,
|
|
@@ -185,24 +185,24 @@
|
|
// xxl: 8,
|
|
// xxl: 8,
|
|
// },
|
|
// },
|
|
// },
|
|
// },
|
|
- {
|
|
|
|
- field: 'useType',
|
|
|
|
- label: '使用类型',
|
|
|
|
- component: 'ApiSelect',
|
|
|
|
- componentProps: {
|
|
|
|
- api: incrementUseTypeList,
|
|
|
|
- labelField: 'name',
|
|
|
|
- valueField: 'id',
|
|
|
|
- immediate: true,
|
|
|
|
- },
|
|
|
|
- colProps: {
|
|
|
|
- xl: 8,
|
|
|
|
- xxl: 8,
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
|
|
+ // {
|
|
|
|
+ // field: 'useType',
|
|
|
|
+ // label: t('routes.empower.useTypeStr'),
|
|
|
|
+ // component: 'ApiSelect',
|
|
|
|
+ // componentProps: {
|
|
|
|
+ // api: incrementUseTypeList,
|
|
|
|
+ // labelField: 'name',
|
|
|
|
+ // valueField: 'id',
|
|
|
|
+ // immediate: true,
|
|
|
|
+ // },
|
|
|
|
+ // colProps: {
|
|
|
|
+ // xl: 8,
|
|
|
|
+ // xxl: 8,
|
|
|
|
+ // },
|
|
|
|
+ // },
|
|
{
|
|
{
|
|
field: 'authorizeKey',
|
|
field: 'authorizeKey',
|
|
- label: '算法授权Key',
|
|
|
|
|
|
+ label: t('routes.empower.authorizeKey'),
|
|
component: 'Input',
|
|
component: 'Input',
|
|
colProps: {
|
|
colProps: {
|
|
xl: 8,
|
|
xl: 8,
|
|
@@ -213,7 +213,7 @@
|
|
};
|
|
};
|
|
const [registerTable, { reload }] = useTable({
|
|
const [registerTable, { reload }] = useTable({
|
|
api: authorizeModelingList,
|
|
api: authorizeModelingList,
|
|
- title: '算法授权列表',
|
|
|
|
|
|
+ title: t('routes.empower.list'),
|
|
columns: columns,
|
|
columns: columns,
|
|
useSearchForm: true,
|
|
useSearchForm: true,
|
|
formConfig: searchForm,
|
|
formConfig: searchForm,
|
|
@@ -227,7 +227,7 @@
|
|
},
|
|
},
|
|
actionColumn: {
|
|
actionColumn: {
|
|
width: 100,
|
|
width: 100,
|
|
- title: '操作',
|
|
|
|
|
|
+ title: t('common.operating'),
|
|
dataIndex: 'action',
|
|
dataIndex: 'action',
|
|
slots: { customRender: 'action' },
|
|
slots: { customRender: 'action' },
|
|
},
|
|
},
|
|
@@ -237,8 +237,8 @@
|
|
async function handleDelete(record) {
|
|
async function handleDelete(record) {
|
|
createConfirm({
|
|
createConfirm({
|
|
iconType: 'warning',
|
|
iconType: 'warning',
|
|
- title: () => h('span', '温馨提示'),
|
|
|
|
- content: () => h('span', '确定要删除授权吗?'),
|
|
|
|
|
|
+ title: () => h('span', t('common.reminder')),
|
|
|
|
+ content: () => h('span', t('routes.empower.deltTips')),
|
|
onOk: async () => {
|
|
onOk: async () => {
|
|
await authorizeModelingdelete({ id: record.id });
|
|
await authorizeModelingdelete({ id: record.id });
|
|
reload();
|
|
reload();
|
|
@@ -248,7 +248,7 @@
|
|
}
|
|
}
|
|
function handleCopy(str: string) {
|
|
function handleCopy(str: string) {
|
|
copyTextToClipboard(str);
|
|
copyTextToClipboard(str);
|
|
- createMessage.success('复制成功');
|
|
|
|
|
|
+ createMessage.success(t('routes.scene.copySccuse'));
|
|
}
|
|
}
|
|
function handleEdit(record = {}) {
|
|
function handleEdit(record = {}) {
|
|
openModal(true, {
|
|
openModal(true, {
|
|
@@ -262,6 +262,7 @@
|
|
handleDelete,
|
|
handleDelete,
|
|
reload,
|
|
reload,
|
|
register,
|
|
register,
|
|
|
|
+ t,
|
|
// getCheckPerm,
|
|
// getCheckPerm,
|
|
handleEdit,
|
|
handleEdit,
|
|
};
|
|
};
|