|
|
|
@ -5,140 +5,167 @@ |
|
|
|
|
:visible="visible" |
|
|
|
|
:confirm-loading="confirmLoading" |
|
|
|
|
@ok="handleOk" |
|
|
|
|
@cancel="handleCancel" |
|
|
|
|
:bordered="false"> |
|
|
|
|
<!-- <!– 查询区域 –>--> |
|
|
|
|
<div class="table-page-search-wrapper"> |
|
|
|
|
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery">--> |
|
|
|
|
<!-- <a-row :gutter="24">--> |
|
|
|
|
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">--> |
|
|
|
|
<!-- <a-form-item label="中文名称">--> |
|
|
|
|
<!-- <a-input placeholder="中文名称" v-model="queryParam.tableName"></a-input>--> |
|
|
|
|
<!-- </a-form-item>--> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">--> |
|
|
|
|
<!-- <a-form-item label="英文名称">--> |
|
|
|
|
<!-- <a-input placeholder="英文名称" v-model="queryParam.tableEnName"></a-input>--> |
|
|
|
|
<!-- </a-form-item>--> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">--> |
|
|
|
|
<!-- <a-form-item label="实体状态">--> |
|
|
|
|
<!-- <j-dict-select-tag type="list" v-model="queryParam.status" dictCode="a_status" placeholder="请选择实体状态" />--> |
|
|
|
|
<!-- </a-form-item>--> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">--> |
|
|
|
|
<!-- <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">--> |
|
|
|
|
<!-- <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>--> |
|
|
|
|
<!-- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>--> |
|
|
|
|
<!-- </span>--> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
<!-- </a-row>--> |
|
|
|
|
<!-- </a-form>--> |
|
|
|
|
<!-- </div>--> |
|
|
|
|
<!-- <!– 查询区域-END –>--> |
|
|
|
|
@cancel="handleCancel"> |
|
|
|
|
<!-- <!– 查询区域 –>--> |
|
|
|
|
<div> |
|
|
|
|
<span style="text-align: center;display:block;font-weight:bold;">模块名称:{{moduleName}}</span> |
|
|
|
|
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery">--> |
|
|
|
|
<!-- <a-row :gutter="24">--> |
|
|
|
|
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">--> |
|
|
|
|
<!-- <a-form-item label="中文名称">--> |
|
|
|
|
<!-- <a-input placeholder="中文名称" v-model="queryParam.tableName"></a-input>--> |
|
|
|
|
<!-- </a-form-item>--> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">--> |
|
|
|
|
<!-- <a-form-item label="英文名称">--> |
|
|
|
|
<!-- <a-input placeholder="英文名称" v-model="queryParam.tableEnName"></a-input>--> |
|
|
|
|
<!-- </a-form-item>--> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">--> |
|
|
|
|
<!-- <a-form-item label="实体状态">--> |
|
|
|
|
<!-- <j-dict-select-tag type="list" v-model="queryParam.status" dictCode="a_status" placeholder="请选择实体状态" />--> |
|
|
|
|
<!-- </a-form-item>--> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">--> |
|
|
|
|
<!-- <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">--> |
|
|
|
|
<!-- <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>--> |
|
|
|
|
<!-- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>--> |
|
|
|
|
<!-- </span>--> |
|
|
|
|
<!-- </a-col>--> |
|
|
|
|
<!-- </a-row>--> |
|
|
|
|
<!-- </a-form>--> |
|
|
|
|
<!-- </div>--> |
|
|
|
|
<!-- <!– 查询区域-END –>--> |
|
|
|
|
|
|
|
|
|
<!-- <!– 操作按钮区域 –>--> |
|
|
|
|
<!-- <div class="table-operator">--> |
|
|
|
|
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>--> |
|
|
|
|
<!-- <a-button type="primary" icon="download" @click="handleExportXls('实体表')">导出</a-button>--> |
|
|
|
|
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> |
|
|
|
|
<!-- <a-button type="primary" icon="import">导入</a-button>--> |
|
|
|
|
<!-- </a-upload>--> |
|
|
|
|
<!-- <!– 高级查询区域 –>--> |
|
|
|
|
<!--<!– <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>–>--> |
|
|
|
|
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">--> |
|
|
|
|
<!-- <a-menu slot="overlay">--> |
|
|
|
|
<!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>--> |
|
|
|
|
<!-- </a-menu>--> |
|
|
|
|
<!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>--> |
|
|
|
|
<!-- </a-dropdown>--> |
|
|
|
|
<!-- <a-button @click="fanhui" type="primary" icon="rollback">返回</a-button>--> |
|
|
|
|
<!-- </div>--> |
|
|
|
|
<!-- 操作按钮区域 --> |
|
|
|
|
<!-- <div class="table-operator">--> |
|
|
|
|
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>--> |
|
|
|
|
<!-- <a-button type="primary" icon="download" @click="handleExportXls('实体表')">导出</a-button>--> |
|
|
|
|
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> |
|
|
|
|
<!-- <a-button type="primary" icon="import">导入</a-button>--> |
|
|
|
|
<!-- </a-upload>--> |
|
|
|
|
<!-- <!– 高级查询区域 –>--> |
|
|
|
|
<!--<!– <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>–>--> |
|
|
|
|
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">--> |
|
|
|
|
<!-- <a-menu slot="overlay">--> |
|
|
|
|
<!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>--> |
|
|
|
|
<!-- </a-menu>--> |
|
|
|
|
<!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>--> |
|
|
|
|
<!-- </a-dropdown>--> |
|
|
|
|
<!-- <a-button @click="fanhui" type="primary" icon="rollback">返回</a-button>--> |
|
|
|
|
<!-- </div>--> |
|
|
|
|
|
|
|
|
|
<!-- <!– table区域-begin –>--> |
|
|
|
|
<!-- <div>--> |
|
|
|
|
<!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> |
|
|
|
|
<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> |
|
|
|
|
<!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> |
|
|
|
|
<!-- </div>--> |
|
|
|
|
|
|
|
|
|
<a-table |
|
|
|
|
ref="table" |
|
|
|
|
size="middle" |
|
|
|
|
:scroll="{x:true}" |
|
|
|
|
bordered |
|
|
|
|
rowKey="id" |
|
|
|
|
<!-- <!– table区域-begin –>--> |
|
|
|
|
<!-- <div>--> |
|
|
|
|
<!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> |
|
|
|
|
<!-- <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项--> |
|
|
|
|
<!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> |
|
|
|
|
<!-- </div>--> |
|
|
|
|
<j-vxe-table |
|
|
|
|
ref="xTable" |
|
|
|
|
:columns="columns" |
|
|
|
|
:dataSource="dataSource" |
|
|
|
|
:pagination="ipagination" |
|
|
|
|
:loading="loading" |
|
|
|
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" |
|
|
|
|
class="j-table-force-nowrap" |
|
|
|
|
@change="handleTableChange"> |
|
|
|
|
height='auto' |
|
|
|
|
|
|
|
|
|
toolbar |
|
|
|
|
:toolbarConfig="toolbarConfig" |
|
|
|
|
|
|
|
|
|
row-number |
|
|
|
|
row-selection |
|
|
|
|
keep-source |
|
|
|
|
async-remove |
|
|
|
|
|
|
|
|
|
<template slot="htmlSlot" slot-scope="text"> |
|
|
|
|
<div v-html="text"></div> |
|
|
|
|
:pagination="pagination" |
|
|
|
|
style="margin-top: 8px;" |
|
|
|
|
@pageChange="handlePageChange" |
|
|
|
|
@added="added"> |
|
|
|
|
<template v-slot:toolbarSuffix> |
|
|
|
|
<a style=" |
|
|
|
|
background: #e6f7ff; |
|
|
|
|
color: red; |
|
|
|
|
position: relative; |
|
|
|
|
border: 1px solid #91d5ff; |
|
|
|
|
padding: 6px 300px 8px 31px; |
|
|
|
|
border-radius: 5px;"> |
|
|
|
|
注意: 编辑后请点击保存按钮保存数据</a> |
|
|
|
|
<!-- <a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>--> |
|
|
|
|
<!-- <p style="color: red;font-size: 16px"></p>--> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <template slot="htmlSlot" slot-scope="text">--> |
|
|
|
|
<!-- <div v-html="text"></div>--> |
|
|
|
|
<!-- </template>--> |
|
|
|
|
<template slot="imgSlot" slot-scope="text"> |
|
|
|
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
|
|
|
|
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> |
|
|
|
|
</template> |
|
|
|
|
<template slot="fileSlot" slot-scope="text"> |
|
|
|
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
|
|
|
|
<a-button |
|
|
|
|
v-else |
|
|
|
|
:ghost="true" |
|
|
|
|
type="primary" |
|
|
|
|
icon="download" |
|
|
|
|
size="small" |
|
|
|
|
@click="downloadFile(text)"> |
|
|
|
|
下载 |
|
|
|
|
</a-button> |
|
|
|
|
</template> |
|
|
|
|
<!-- <template slot="fileSlot" slot-scope="text">--> |
|
|
|
|
<!-- <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>--> |
|
|
|
|
<!-- <a-button--> |
|
|
|
|
<!-- v-else--> |
|
|
|
|
<!-- :ghost="true"--> |
|
|
|
|
<!-- type="primary"--> |
|
|
|
|
<!-- icon="download"--> |
|
|
|
|
<!-- size="small"--> |
|
|
|
|
<!-- @click="downloadFile(text)">--> |
|
|
|
|
<!-- 下载--> |
|
|
|
|
<!-- </a-button>--> |
|
|
|
|
<!-- </template>--> |
|
|
|
|
|
|
|
|
|
<!-- <template slot="htmlSlot" slot-scope="text,record">--> |
|
|
|
|
<!-- <a @click="viewVid(record)">字段</a>--> |
|
|
|
|
<!-- </template>--> |
|
|
|
|
<!-- <template slot="htmlSlot" slot-scope="text,record">--> |
|
|
|
|
<!-- <a @click="viewVid(record)">字段</a>--> |
|
|
|
|
<!-- </template>--> |
|
|
|
|
|
|
|
|
|
<span slot="action" slot-scope="text, record"> |
|
|
|
|
<!-- <span slot="action" slot-scope="text, record">--> |
|
|
|
|
|
|
|
|
|
<a @click="handleEdit(record)">编辑</a> |
|
|
|
|
<!-- <a @click="handleEdit(record)">编辑</a>--> |
|
|
|
|
|
|
|
|
|
<a-divider type="vertical" /> |
|
|
|
|
<a @click="handleDetail(record)">详情</a> |
|
|
|
|
<a-divider type="vertical" /> |
|
|
|
|
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
|
|
|
|
<!-- <a-divider type="vertical" />--> |
|
|
|
|
<!-- <a @click="handleDetail(record)">详情</a>--> |
|
|
|
|
<!-- <a-divider type="vertical" />--> |
|
|
|
|
<!-- <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">--> |
|
|
|
|
<!-- <a>删除</a>--> |
|
|
|
|
<!-- </a-popconfirm>--> |
|
|
|
|
<!-- </span>--> |
|
|
|
|
<template v-slot:action="props"> |
|
|
|
|
<a @click="submitForm(props)">保存</a> |
|
|
|
|
<a-divider type="vertical"/> |
|
|
|
|
<!-- <a @click="viewDetail(props.rowId)">详情</a>--> |
|
|
|
|
<!-- <a-divider type="vertical"/>--> |
|
|
|
|
<a-popconfirm title="确定删除吗?" @confirm="handleDelete(props.rowId)"> |
|
|
|
|
<a>删除</a> |
|
|
|
|
</a-popconfirm> |
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
</a-table> |
|
|
|
|
</template> |
|
|
|
|
</j-vxe-table> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<tablex-modal ref="modalForm" @ok="modalFormOk"></tablex-modal> |
|
|
|
|
<FieldxList ref="FieldxList"></FieldxList> |
|
|
|
|
<!-- <tablex-modal ref="modalForm" @ok="modalFormOk"></tablex-modal>--> |
|
|
|
|
<!-- <FieldxList ref="FieldxList"></FieldxList>--> |
|
|
|
|
</a-modal> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
|
|
|
|
|
import '@/assets/less/TableExpand.less' |
|
|
|
|
import { mixinDevice } from '@/utils/mixin' |
|
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
|
|
|
|
import TablexModal from './modules/TablexModal' |
|
|
|
|
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
|
|
|
|
import JEllipsis from '@/components/jeecg/JEllipsis' |
|
|
|
|
import FieldxList from "@/views/fieldx/FieldxList"; |
|
|
|
|
import {getAction} from "@api/manage"; |
|
|
|
|
import {filterObj} from "@/utils/util"; |
|
|
|
|
import '@/assets/less/TableExpand.less' |
|
|
|
|
import { mixinDevice } from '@/utils/mixin' |
|
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
|
|
|
|
import TablexModal from './modules/TablexModal' |
|
|
|
|
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' |
|
|
|
|
import JEllipsis from '@/components/jeecg/JEllipsis' |
|
|
|
|
import FieldxList from "@/views/fieldx/FieldxList"; |
|
|
|
|
import {getAction, httpAction} from "@api/manage"; |
|
|
|
|
import {filterObj} from "@/utils/util"; |
|
|
|
|
import {JVXETypes} from "@comp/jeecg/JVxeTable"; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
export default { |
|
|
|
|
name: 'TablexList', |
|
|
|
|
mixins:[JeecgListMixin, mixinDevice], |
|
|
|
|
components: { |
|
|
|
|
TablexModal, |
|
|
|
|
JEllipsis, |
|
|
|
|
FieldxList, |
|
|
|
|
// TablexModal, |
|
|
|
|
// JEllipsis, |
|
|
|
|
// FieldxList, |
|
|
|
|
}, |
|
|
|
|
data () { |
|
|
|
|
let ellipsis = (v, l = 20) => (<j-ellipsis value={v} length={l}/>) |
|
|
|
@ -149,106 +176,227 @@ |
|
|
|
|
// 表头 |
|
|
|
|
visible: false, |
|
|
|
|
confirmLoading: false, |
|
|
|
|
columns: [ |
|
|
|
|
{ |
|
|
|
|
title: '#', |
|
|
|
|
dataIndex: '', |
|
|
|
|
key:'rowIndex', |
|
|
|
|
width:60, |
|
|
|
|
align:"center", |
|
|
|
|
customRender:function (t,r,index) { |
|
|
|
|
return parseInt(index)+1; |
|
|
|
|
} |
|
|
|
|
// 工具栏的按钮配置 |
|
|
|
|
toolbarConfig: { |
|
|
|
|
// add 新增按钮;remove 删除按钮;clearSelection 清空选择按钮 |
|
|
|
|
btn: ['add'], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title:'对应模块', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'moduleId_dictText' |
|
|
|
|
// 是否正在加载 |
|
|
|
|
loading: false, |
|
|
|
|
// 分页器参数 |
|
|
|
|
pagination: { |
|
|
|
|
// 当前页码 |
|
|
|
|
current: 1, |
|
|
|
|
// 每页的条数 |
|
|
|
|
pageSize: 10, |
|
|
|
|
// 可切换的条数 |
|
|
|
|
pageSizeOptions: ['10', '20', '30', '100', '200'], |
|
|
|
|
// 数据总数(目前并不知道真实的总数,所以先填写0,在后台查出来后再赋值) |
|
|
|
|
total: 0, |
|
|
|
|
showQuickJumper: true, |
|
|
|
|
showSizeChanger: true, |
|
|
|
|
id: null |
|
|
|
|
}, |
|
|
|
|
// 开启 reload 数据效果 |
|
|
|
|
reloadEffect:true, |
|
|
|
|
columns: [ |
|
|
|
|
// { |
|
|
|
|
// key: 'moduleId_dictText', |
|
|
|
|
// title:'对应模块', |
|
|
|
|
// width: '6%', |
|
|
|
|
// type: JVXETypes.normal, |
|
|
|
|
// disabled: true, |
|
|
|
|
// }, |
|
|
|
|
{ |
|
|
|
|
title:'中文名称', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'tableName' |
|
|
|
|
key: 'tableName', title: '中文名称', width: '6%', |
|
|
|
|
validateRules: [{required: true, message: '${title}不能为空'}], |
|
|
|
|
type: JVXETypes.normal, |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title:'英文名称', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'tableEnName' |
|
|
|
|
key: 'tableEnName', title: '英文名称', width: '6%', |
|
|
|
|
validateRules: [{required: true, message: '${title}不能为空'}], |
|
|
|
|
type: JVXETypes.normal, |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title:'表结构SQL', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'tableStructure', |
|
|
|
|
title:'表结构SQL', width: '14%', |
|
|
|
|
key: 'tableStructure', |
|
|
|
|
type: JVXETypes.normal, |
|
|
|
|
align: 'center', |
|
|
|
|
disabled: true, |
|
|
|
|
customRender: (t)=>ellipsis(t) |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title:'结构图', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'structuralDiagram', |
|
|
|
|
scopedSlots: {customRender: 'imgSlot'} |
|
|
|
|
title:'结构图', width: '10%', |
|
|
|
|
key: 'structuralDiagram', |
|
|
|
|
type: JVXETypes.upload, |
|
|
|
|
scopedSlots: {customRender: 'imgSlot'}, |
|
|
|
|
align: 'center', |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title:'创建人', |
|
|
|
|
title:'创建人',width: '6%', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'createBy' |
|
|
|
|
key: 'createBy' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title:'创建时间', |
|
|
|
|
title:'创建时间',width: '6%', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'createTime' |
|
|
|
|
key: 'createTime' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title:'修改人', |
|
|
|
|
title:'修改人',width: '6%', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'updateBy' |
|
|
|
|
key: 'updateBy' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title:'修改时间', |
|
|
|
|
title:'修改时间',width: '6%', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'updateTime' |
|
|
|
|
key: 'updateTime' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title:'实体状态', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'status_dictText' |
|
|
|
|
title:'实体状态', width: '6%', |
|
|
|
|
key: 'status_dictText', |
|
|
|
|
dictCode:'a_status', |
|
|
|
|
defaultValue:1, |
|
|
|
|
type: JVXETypes.select, |
|
|
|
|
align: 'center', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title:'版本状态', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'verisonStatus_dictText' |
|
|
|
|
key: 'verisonStatus', title: '版本状态', width: '6%', |
|
|
|
|
type: JVXETypes.select, |
|
|
|
|
dictCode:'verison_status', |
|
|
|
|
defaultValue:1, |
|
|
|
|
validateRules: [{required: true, message: '${title}不能为空'}], |
|
|
|
|
align: 'center', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title:'版本号', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'verison' |
|
|
|
|
key: 'verison', title: '版本号', width: '6%', |
|
|
|
|
type: JVXETypes.normal, |
|
|
|
|
dictCode:'yn', |
|
|
|
|
align: 'center', |
|
|
|
|
}, |
|
|
|
|
// { |
|
|
|
|
// title: '管理', |
|
|
|
|
// dataIndex: 'htmlSlot', |
|
|
|
|
// align: "center", |
|
|
|
|
// fixed: "right", |
|
|
|
|
// width: 147, |
|
|
|
|
// scopedSlots: {customRender: 'htmlSlot'} |
|
|
|
|
// }, |
|
|
|
|
{ |
|
|
|
|
title: '操作', |
|
|
|
|
dataIndex: 'action', |
|
|
|
|
align:"center", |
|
|
|
|
fixed:"right", |
|
|
|
|
width:147, |
|
|
|
|
scopedSlots: { customRender: 'action' } |
|
|
|
|
key: 'action', |
|
|
|
|
type: JVXETypes.slot, |
|
|
|
|
fixed: 'right', |
|
|
|
|
// 对齐方式为居中 |
|
|
|
|
align: 'center', |
|
|
|
|
minWidth: '6%', |
|
|
|
|
slotName: 'action', |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
// columns: [ |
|
|
|
|
// { |
|
|
|
|
// title: '#', |
|
|
|
|
// dataIndex: '', |
|
|
|
|
// key:'rowIndex', |
|
|
|
|
// width:60, |
|
|
|
|
// align:"center", |
|
|
|
|
// customRender:function (t,r,index) { |
|
|
|
|
// return parseInt(index)+1; |
|
|
|
|
// } |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// title:'对应模块', |
|
|
|
|
// align:"center", |
|
|
|
|
// dataIndex: 'moduleId_dictText' |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// title:'中文名称', |
|
|
|
|
// align:"center", |
|
|
|
|
// dataIndex: 'tableName' |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// title:'英文名称', |
|
|
|
|
// align:"center", |
|
|
|
|
// dataIndex: 'tableEnName' |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// title:'表结构SQL', |
|
|
|
|
// align:"center", |
|
|
|
|
// dataIndex: 'tableStructure', |
|
|
|
|
// customRender: (t)=>ellipsis(t) |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// title:'结构图', |
|
|
|
|
// align:"center", |
|
|
|
|
// dataIndex: 'structuralDiagram', |
|
|
|
|
// scopedSlots: {customRender: 'imgSlot'} |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// title:'创建人', |
|
|
|
|
// align:"center", |
|
|
|
|
// dataIndex: 'createBy' |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// title:'创建时间', |
|
|
|
|
// align:"center", |
|
|
|
|
// dataIndex: 'createTime' |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// title:'修改人', |
|
|
|
|
// align:"center", |
|
|
|
|
// dataIndex: 'updateBy' |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// title:'修改时间', |
|
|
|
|
// align:"center", |
|
|
|
|
// dataIndex: 'updateTime' |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// title:'实体状态', |
|
|
|
|
// align:"center", |
|
|
|
|
// dataIndex: 'status_dictText' |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// title:'版本状态', |
|
|
|
|
// align:"center", |
|
|
|
|
// dataIndex: 'verisonStatus_dictText' |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// title:'版本号', |
|
|
|
|
// align:"center", |
|
|
|
|
// dataIndex: 'verison' |
|
|
|
|
// }, |
|
|
|
|
// // { |
|
|
|
|
// // title: '管理', |
|
|
|
|
// // dataIndex: 'htmlSlot', |
|
|
|
|
// // align: "center", |
|
|
|
|
// // fixed: "right", |
|
|
|
|
// // width: 147, |
|
|
|
|
// // scopedSlots: {customRender: 'htmlSlot'} |
|
|
|
|
// // }, |
|
|
|
|
// { |
|
|
|
|
// title: '操作', |
|
|
|
|
// dataIndex: 'action', |
|
|
|
|
// align:"center", |
|
|
|
|
// fixed:"right", |
|
|
|
|
// width:147, |
|
|
|
|
// scopedSlots: { customRender: 'action' } |
|
|
|
|
// } |
|
|
|
|
// ], |
|
|
|
|
url: { |
|
|
|
|
add: "/tablex/tablex/add", |
|
|
|
|
edit: "/tablex/tablex/edit", |
|
|
|
|
list: "/tablex/tablex/list", |
|
|
|
|
delete: "/tablex/tablex/delete", |
|
|
|
|
deleteBatch: "/tablex/tablex/deleteBatch", |
|
|
|
|
exportXlsUrl: "/tablex/tablex/exportXls", |
|
|
|
|
importExcelUrl: "tablex/tablex/importExcel", |
|
|
|
|
|
|
|
|
|
getTableByModuleId:"tablex/tablex/getTableByModuleId", |
|
|
|
|
}, |
|
|
|
|
dictOptions:{}, |
|
|
|
|
superFieldList:[], |
|
|
|
|
//参数 |
|
|
|
|
loadRouteType: false, |
|
|
|
|
isorterx: { |
|
|
|
|
column: 'createTime', |
|
|
|
|
order: 'asc', |
|
|
|
|
}, |
|
|
|
|
moduleName:'', |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
@ -262,6 +410,33 @@ |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
submitForm(props) { |
|
|
|
|
this.model = Object.assign({}, props); |
|
|
|
|
var str = props.rowId; |
|
|
|
|
let httpurl = ''; |
|
|
|
|
let method = ''; |
|
|
|
|
if (str.search("row") !== -1) { |
|
|
|
|
props.row.id =''; |
|
|
|
|
console.log("新增") |
|
|
|
|
httpurl += this.url.add; |
|
|
|
|
method = 'post'; |
|
|
|
|
} else { |
|
|
|
|
console.log("编辑") |
|
|
|
|
httpurl += this.url.edit; |
|
|
|
|
method = 'put'; |
|
|
|
|
} |
|
|
|
|
props.row.moduleId = this.moduleid |
|
|
|
|
console.log(props.row) |
|
|
|
|
httpAction(httpurl, props.row, method).then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
|
this.$message.success(res.message); |
|
|
|
|
this.$emit('ok'); |
|
|
|
|
} else { |
|
|
|
|
this.$message.warning(res.message); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
props.row |
|
|
|
|
}, |
|
|
|
|
fanhui(){ |
|
|
|
|
this.$router.push({ |
|
|
|
|
/*返回产品*/ |
|
|
|
@ -271,13 +446,53 @@ |
|
|
|
|
}/*在引号中填写返回vue*/ |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handlePageChange(event) { |
|
|
|
|
// 重新赋值 |
|
|
|
|
this.pagination.current = event.current |
|
|
|
|
this.pagination.pageSize = event.pageSize |
|
|
|
|
// 查询数据 |
|
|
|
|
this.loadData() |
|
|
|
|
}, |
|
|
|
|
//新增触发事件 |
|
|
|
|
added(event) { |
|
|
|
|
//获取的表格所有数据,通过ref为表格起名 |
|
|
|
|
// const values = this.$refs.xTable.getTableData() |
|
|
|
|
// console.log('获取值:', { values }) |
|
|
|
|
const {type, row, column, value, target} = event |
|
|
|
|
console.log(event,"-------") |
|
|
|
|
|
|
|
|
|
target.setValues([{ |
|
|
|
|
rowKey: row.id, |
|
|
|
|
values: {moduleId_dictText: this.moduleName, |
|
|
|
|
tableName: this.moduleName, |
|
|
|
|
tableEnName:this.moduleEnName |
|
|
|
|
} |
|
|
|
|
}]) |
|
|
|
|
}, |
|
|
|
|
//数据发生变化时事件 即 编辑 时同步保存 |
|
|
|
|
async handleValueChange(event) { |
|
|
|
|
//this.submitForm(event) |
|
|
|
|
// console.log("//数据发生变化时事件", event); |
|
|
|
|
//const str = event.row.id; |
|
|
|
|
let httpUrl = this.url.edit; |
|
|
|
|
let method = 'put'; |
|
|
|
|
await httpAction(httpUrl, event.row, method).then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
|
this.$message.success(res.message); |
|
|
|
|
this.$emit('ok'); |
|
|
|
|
} else { |
|
|
|
|
this.$message.warning(res.message); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
edit(record) { |
|
|
|
|
this.model = Object.assign({}, record); |
|
|
|
|
console.log(this.model) |
|
|
|
|
//console.log(topicid); |
|
|
|
|
this.queryParam.moduleId = this.model.id; |
|
|
|
|
this.tableid = this.model.id |
|
|
|
|
this.tableName=this.model.tableName; |
|
|
|
|
this.moduleid = this.model.id |
|
|
|
|
this.moduleName=this.model.moduleName; |
|
|
|
|
this.moduleEnName=this.model.moduleEnName; |
|
|
|
|
console.log(this.queryParam.moduleId); |
|
|
|
|
this.loadData(); |
|
|
|
|
}, |
|
|
|
@ -373,8 +588,8 @@ |
|
|
|
|
this.loadData(); |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
<style scoped> |
|
|
|
|
@import '~@assets/less/common.less'; |
|
|
|
|
@import '~@assets/less/common.less'; |
|
|
|
|
</style> |