|
|
@ -1,59 +1,66 @@ |
|
|
|
<template> |
|
|
|
<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"> |
|
|
|
<div class="table-page-search-wrapper"> |
|
|
|
<a-form layout="inline" @keyup.enter.native="searchQuery"> |
|
|
|
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery">--> |
|
|
|
<a-row :gutter="24"> |
|
|
|
<!-- <a-row :gutter="24">--> |
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
|
|
|
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">--> |
|
|
|
<a-form-item label="中文名称"> |
|
|
|
<!-- <a-form-item label="中文名称">--> |
|
|
|
<a-input placeholder="中文名称" v-model="queryParam.tableName"></a-input> |
|
|
|
<!-- <a-input placeholder="中文名称" v-model="queryParam.tableName"></a-input>--> |
|
|
|
</a-form-item> |
|
|
|
<!-- </a-form-item>--> |
|
|
|
</a-col> |
|
|
|
<!-- </a-col>--> |
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
|
|
|
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">--> |
|
|
|
<a-form-item label="英文名称"> |
|
|
|
<!-- <a-form-item label="英文名称">--> |
|
|
|
<a-input placeholder="英文名称" v-model="queryParam.tableEnName"></a-input> |
|
|
|
<!-- <a-input placeholder="英文名称" v-model="queryParam.tableEnName"></a-input>--> |
|
|
|
</a-form-item> |
|
|
|
<!-- </a-form-item>--> |
|
|
|
</a-col> |
|
|
|
<!-- </a-col>--> |
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
|
|
|
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">--> |
|
|
|
<a-form-item label="实体状态"> |
|
|
|
<!-- <a-form-item label="实体状态">--> |
|
|
|
<j-dict-select-tag type="list" v-model="queryParam.status" dictCode="a_status" placeholder="请选择实体状态" /> |
|
|
|
<!-- <j-dict-select-tag type="list" v-model="queryParam.status" dictCode="a_status" placeholder="请选择实体状态" />--> |
|
|
|
</a-form-item> |
|
|
|
<!-- </a-form-item>--> |
|
|
|
</a-col> |
|
|
|
<!-- </a-col>--> |
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24"> |
|
|
|
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">--> |
|
|
|
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
|
|
|
<!-- <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="searchQuery" icon="search">查询</a-button>--> |
|
|
|
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
|
|
|
<!-- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>--> |
|
|
|
</span> |
|
|
|
<!-- </span>--> |
|
|
|
</a-col> |
|
|
|
<!-- </a-col>--> |
|
|
|
</a-row> |
|
|
|
<!-- </a-row>--> |
|
|
|
</a-form> |
|
|
|
<!-- </a-form>--> |
|
|
|
</div> |
|
|
|
<!-- </div>--> |
|
|
|
<!-- 查询区域-END --> |
|
|
|
<!-- <!– 查询区域-END –>--> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 操作按钮区域 --> |
|
|
|
<!-- <!– 操作按钮区域 –>--> |
|
|
|
<div class="table-operator"> |
|
|
|
<!-- <div class="table-operator">--> |
|
|
|
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
|
|
|
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>--> |
|
|
|
<a-button type="primary" icon="download" @click="handleExportXls('实体表')">导出</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-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> |
|
|
|
<a-button type="primary" icon="import">导入</a-button> |
|
|
|
<!-- <a-button type="primary" icon="import">导入</a-button>--> |
|
|
|
</a-upload> |
|
|
|
<!-- </a-upload>--> |
|
|
|
<!-- 高级查询区域 --> |
|
|
|
<!-- <!– 高级查询区域 –>--> |
|
|
|
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> |
|
|
|
<!--<!– <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>–>--> |
|
|
|
<a-dropdown v-if="selectedRowKeys.length > 0"> |
|
|
|
<!-- <a-dropdown v-if="selectedRowKeys.length > 0">--> |
|
|
|
<a-menu slot="overlay"> |
|
|
|
<!-- <a-menu slot="overlay">--> |
|
|
|
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> |
|
|
|
<!-- <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>--> |
|
|
|
</a-menu> |
|
|
|
<!-- </a-menu>--> |
|
|
|
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> |
|
|
|
<!-- <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>--> |
|
|
|
</a-dropdown> |
|
|
|
<!-- </a-dropdown>--> |
|
|
|
<a-button @click="fanhui" type="primary" icon="rollback">返回</a-button> |
|
|
|
<!-- <a-button @click="fanhui" type="primary" icon="rollback">返回</a-button>--> |
|
|
|
</div> |
|
|
|
<!-- </div>--> |
|
|
|
|
|
|
|
|
|
|
|
<!-- table区域-begin --> |
|
|
|
<!-- <!– table区域-begin –>--> |
|
|
|
<div> |
|
|
|
<!-- <div>--> |
|
|
|
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> |
|
|
|
<!-- <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>项 |
|
|
|
<!-- <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> |
|
|
|
<!-- <a style="margin-left: 24px" @click="onClearSelected">清空</a>--> |
|
|
|
</div> |
|
|
|
<!-- </div>--> |
|
|
|
|
|
|
|
|
|
|
|
<a-table |
|
|
|
<a-table |
|
|
|
ref="table" |
|
|
|
ref="table" |
|
|
@ -89,9 +96,9 @@ |
|
|
|
</a-button> |
|
|
|
</a-button> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<template slot="htmlSlot" slot-scope="text,record"> |
|
|
|
<!-- <template slot="htmlSlot" slot-scope="text,record">--> |
|
|
|
<a @click="viewVid(record)">字段</a> |
|
|
|
<!-- <a @click="viewVid(record)">字段</a>--> |
|
|
|
</template> |
|
|
|
<!-- </template>--> |
|
|
|
|
|
|
|
|
|
|
|
<span slot="action" slot-scope="text, record"> |
|
|
|
<span slot="action" slot-scope="text, record"> |
|
|
|
|
|
|
|
|
|
|
@ -110,7 +117,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
<tablex-modal ref="modalForm" @ok="modalFormOk"></tablex-modal> |
|
|
|
<tablex-modal ref="modalForm" @ok="modalFormOk"></tablex-modal> |
|
|
|
<FieldxList ref="FieldxList"></FieldxList> |
|
|
|
<FieldxList ref="FieldxList"></FieldxList> |
|
|
|
</a-card> |
|
|
|
</a-modal> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
@ -136,9 +143,12 @@ |
|
|
|
data () { |
|
|
|
data () { |
|
|
|
let ellipsis = (v, l = 20) => (<j-ellipsis value={v} length={l}/>) |
|
|
|
let ellipsis = (v, l = 20) => (<j-ellipsis value={v} length={l}/>) |
|
|
|
return { |
|
|
|
return { |
|
|
|
loadRouteType:false, |
|
|
|
// loadRouteType:false, |
|
|
|
description: '实体表管理页面', |
|
|
|
description: '实体表管理页面', |
|
|
|
|
|
|
|
moduleid:'', |
|
|
|
// 表头 |
|
|
|
// 表头 |
|
|
|
|
|
|
|
visible: false, |
|
|
|
|
|
|
|
confirmLoading: false, |
|
|
|
columns: [ |
|
|
|
columns: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '#', |
|
|
|
title: '#', |
|
|
@ -212,14 +222,14 @@ |
|
|
|
align:"center", |
|
|
|
align:"center", |
|
|
|
dataIndex: 'verison' |
|
|
|
dataIndex: 'verison' |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
// { |
|
|
|
title: '管理', |
|
|
|
// title: '管理', |
|
|
|
dataIndex: 'htmlSlot', |
|
|
|
// dataIndex: 'htmlSlot', |
|
|
|
align: "center", |
|
|
|
// align: "center", |
|
|
|
fixed: "right", |
|
|
|
// fixed: "right", |
|
|
|
width: 147, |
|
|
|
// width: 147, |
|
|
|
scopedSlots: {customRender: 'htmlSlot'} |
|
|
|
// scopedSlots: {customRender: 'htmlSlot'} |
|
|
|
}, |
|
|
|
// }, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '操作', |
|
|
|
title: '操作', |
|
|
|
dataIndex: 'action', |
|
|
|
dataIndex: 'action', |
|
|
@ -261,6 +271,26 @@ |
|
|
|
}/*在引号中填写返回vue*/ |
|
|
|
}/*在引号中填写返回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) { |
|
|
|
viewVid(record) { |
|
|
|
this.$refs.FieldxList.showModal(); |
|
|
|
this.$refs.FieldxList.showModal(); |
|
|
|
this.$refs.FieldxList.edit(record); |
|
|
|
this.$refs.FieldxList.edit(record); |
|
|
@ -294,16 +324,17 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
loadData(arg) { |
|
|
|
loadData(arg) { |
|
|
|
if (!this.url.list) { |
|
|
|
// if (!this.url.list) { |
|
|
|
this.$message.error("请设置url.list属性!"); |
|
|
|
// this.$message.error("请设置url.list属性!"); |
|
|
|
return |
|
|
|
// return |
|
|
|
} |
|
|
|
// } |
|
|
|
//加载数据 若传入参数1则加载第一页的内容 |
|
|
|
//加载数据 若传入参数1则加载第一页的内容 |
|
|
|
if (arg === 1) { |
|
|
|
if (arg === 1) { |
|
|
|
this.ipagination.current = 1; |
|
|
|
this.ipagination.current = 1; |
|
|
|
} |
|
|
|
} |
|
|
|
this.loadParameter(); |
|
|
|
this.loadParameter(); |
|
|
|
var params = this.getQueryParams();//查询条件 |
|
|
|
var params = this.getQueryParams();//查询条件 |
|
|
|
|
|
|
|
console.log(params) |
|
|
|
this.loading = true; |
|
|
|
this.loading = true; |
|
|
|
getAction(this.url.list, params).then((res) => { |
|
|
|
getAction(this.url.list, params).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
if (res.success) { |
|
|
@ -334,7 +365,7 @@ |
|
|
|
param.pageNo = this.ipagination.current; |
|
|
|
param.pageNo = this.ipagination.current; |
|
|
|
param.pageSize = this.ipagination.pageSize; |
|
|
|
param.pageSize = this.ipagination.pageSize; |
|
|
|
//param.id=this.id; |
|
|
|
//param.id=this.id; |
|
|
|
param.moduleId = this.$route.query.moduleid; |
|
|
|
// param.moduleId = this.$route.query.moduleid; |
|
|
|
return filterObj(param); |
|
|
|
return filterObj(param); |
|
|
|
}, |
|
|
|
}, |
|
|
|
searchReset() { |
|
|
|
searchReset() { |
|
|
|