|
|
|
@ -1,59 +1,66 @@ |
|
|
|
|
<template> |
|
|
|
|
<a-card :bordered="false"> |
|
|
|
|
<!-- 查询区域 --> |
|
|
|
|
<a-modal |
|
|
|
|
width="96%" |
|
|
|
|
title="实体管理" |
|
|
|
|
: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 --> |
|
|
|
|
<!-- <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> |
|
|
|
|
<!-- <!– 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" |
|
|
|
@ -89,9 +96,9 @@ |
|
|
|
|
</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"> |
|
|
|
|
|
|
|
|
@ -110,7 +117,7 @@ |
|
|
|
|
|
|
|
|
|
<tablex-modal ref="modalForm" @ok="modalFormOk"></tablex-modal> |
|
|
|
|
<FieldxList ref="FieldxList"></FieldxList> |
|
|
|
|
</a-card> |
|
|
|
|
</a-modal> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
@ -136,9 +143,12 @@ |
|
|
|
|
data () { |
|
|
|
|
let ellipsis = (v, l = 20) => (<j-ellipsis value={v} length={l}/>) |
|
|
|
|
return { |
|
|
|
|
loadRouteType:false, |
|
|
|
|
// loadRouteType:false, |
|
|
|
|
description: '实体表管理页面', |
|
|
|
|
moduleid:'', |
|
|
|
|
// 表头 |
|
|
|
|
visible: false, |
|
|
|
|
confirmLoading: false, |
|
|
|
|
columns: [ |
|
|
|
|
{ |
|
|
|
|
title: '#', |
|
|
|
@ -212,14 +222,14 @@ |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'verison' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '管理', |
|
|
|
|
dataIndex: 'htmlSlot', |
|
|
|
|
align: "center", |
|
|
|
|
fixed: "right", |
|
|
|
|
width: 147, |
|
|
|
|
scopedSlots: {customRender: 'htmlSlot'} |
|
|
|
|
}, |
|
|
|
|
// { |
|
|
|
|
// title: '管理', |
|
|
|
|
// dataIndex: 'htmlSlot', |
|
|
|
|
// align: "center", |
|
|
|
|
// fixed: "right", |
|
|
|
|
// width: 147, |
|
|
|
|
// scopedSlots: {customRender: 'htmlSlot'} |
|
|
|
|
// }, |
|
|
|
|
{ |
|
|
|
|
title: '操作', |
|
|
|
|
dataIndex: 'action', |
|
|
|
@ -261,6 +271,26 @@ |
|
|
|
|
}/*在引号中填写返回vue*/ |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
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; |
|
|
|
|
console.log(this.queryParam.moduleId); |
|
|
|
|
this.loadData(); |
|
|
|
|
}, |
|
|
|
|
showModal() { |
|
|
|
|
this.visible = true; |
|
|
|
|
}, |
|
|
|
|
handleOk(e) { |
|
|
|
|
this.visible = false; |
|
|
|
|
}, |
|
|
|
|
handleCancel(e) { |
|
|
|
|
console.log('Clicked cancel button'); |
|
|
|
|
this.visible = false; |
|
|
|
|
}, |
|
|
|
|
viewVid(record) { |
|
|
|
|
this.$refs.FieldxList.showModal(); |
|
|
|
|
this.$refs.FieldxList.edit(record); |
|
|
|
@ -294,16 +324,17 @@ |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
loadData(arg) { |
|
|
|
|
if (!this.url.list) { |
|
|
|
|
this.$message.error("请设置url.list属性!"); |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
// if (!this.url.list) { |
|
|
|
|
// this.$message.error("请设置url.list属性!"); |
|
|
|
|
// return |
|
|
|
|
// } |
|
|
|
|
//加载数据 若传入参数1则加载第一页的内容 |
|
|
|
|
if (arg === 1) { |
|
|
|
|
this.ipagination.current = 1; |
|
|
|
|
} |
|
|
|
|
this.loadParameter(); |
|
|
|
|
var params = this.getQueryParams();//查询条件 |
|
|
|
|
console.log(params) |
|
|
|
|
this.loading = true; |
|
|
|
|
getAction(this.url.list, params).then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
@ -334,7 +365,7 @@ |
|
|
|
|
param.pageNo = this.ipagination.current; |
|
|
|
|
param.pageSize = this.ipagination.pageSize; |
|
|
|
|
//param.id=this.id; |
|
|
|
|
param.moduleId = this.$route.query.moduleid; |
|
|
|
|
// param.moduleId = this.$route.query.moduleid; |
|
|
|
|
return filterObj(param); |
|
|
|
|
}, |
|
|
|
|
searchReset() { |
|
|
|
|