|
|
|
@ -4,6 +4,28 @@ |
|
|
|
|
<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.ruleCode"></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.tableId" :dictCode=table placeholder="请选择对应实体" @change="ziduan"/> |
|
|
|
|
</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.fieldId" :dictCode=field 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> |
|
|
|
@ -17,13 +39,14 @@ |
|
|
|
|
<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> |
|
|
|
|
<!-- <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 --> |
|
|
|
@ -67,23 +90,24 @@ |
|
|
|
|
</a-button> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<span slot="action" slot-scope="text, record"> |
|
|
|
|
<span slot="action" slot-scope="text, record"v-if="role==2"> |
|
|
|
|
<a @click="handleDetail(record)">详情</a> |
|
|
|
|
</span> |
|
|
|
|
<span slot="action" slot-scope="text, record"v-if="role==1"> |
|
|
|
|
<a @click="fuzhi1(record)">复制</a> |
|
|
|
|
<a-divider type="vertical" /> |
|
|
|
|
<a @click="fankui(record)">DEBUG</a> |
|
|
|
|
<a-divider type="vertical" /> |
|
|
|
|
<a @click="handleEdit(record)">编辑</a> |
|
|
|
|
|
|
|
|
|
<a-divider type="vertical" /> |
|
|
|
|
<a-dropdown> |
|
|
|
|
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a> |
|
|
|
|
<a-menu slot="overlay"> |
|
|
|
|
<a-menu-item> |
|
|
|
|
|
|
|
|
|
<a @click="handleDetail(record)">详情</a> |
|
|
|
|
</a-menu-item> |
|
|
|
|
<a-menu-item> |
|
|
|
|
<a-divider type="vertical" /> |
|
|
|
|
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> |
|
|
|
|
<a>删除</a> |
|
|
|
|
</a-popconfirm> |
|
|
|
|
</a-menu-item> |
|
|
|
|
</a-menu> |
|
|
|
|
</a-dropdown> |
|
|
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
</a-table> |
|
|
|
@ -99,7 +123,9 @@ |
|
|
|
|
import { mixinDevice } from '@/utils/mixin' |
|
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
|
|
|
|
import RulexModal from './modules/RulexModal' |
|
|
|
|
|
|
|
|
|
import {getAction} from "@api/manage"; |
|
|
|
|
import {filterObj} from "@/utils/util"; |
|
|
|
|
import store from '@/store' |
|
|
|
|
export default { |
|
|
|
|
name: 'RulexList', |
|
|
|
|
mixins:[JeecgListMixin, mixinDevice], |
|
|
|
@ -122,14 +148,14 @@ |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title:'对应模块id', |
|
|
|
|
title:'对应模块', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'moduleId' |
|
|
|
|
dataIndex: 'moduleId_dictText' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title:'对应功能id', |
|
|
|
|
title:'对应功能', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'functionId' |
|
|
|
|
dataIndex: 'functionId_dictText' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title:'规则序号', |
|
|
|
@ -153,7 +179,7 @@ |
|
|
|
|
scopedSlots: {customRender: 'imgSlot'} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title:'对应实体id', |
|
|
|
|
title:'对应实体', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'tableId_dictText' |
|
|
|
|
}, |
|
|
|
@ -162,11 +188,6 @@ |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'fieldId_dictText' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title:'责任人', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'managerUsers' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title:'任务等级', |
|
|
|
|
align:"center", |
|
|
|
@ -197,21 +218,6 @@ |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'realDuration' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title:'规则状态', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'status' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title:'版本状态', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'verisonStatus' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title:'版本号', |
|
|
|
|
align:"center", |
|
|
|
|
dataIndex: 'verison' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '操作', |
|
|
|
|
dataIndex: 'action', |
|
|
|
@ -227,13 +233,25 @@ |
|
|
|
|
deleteBatch: "/rulex/rulex/deleteBatch", |
|
|
|
|
exportXlsUrl: "/rulex/rulex/exportXls", |
|
|
|
|
importExcelUrl: "rulex/rulex/importExcel", |
|
|
|
|
loginrole:'functionx/functionx/loginrole', |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
dictOptions:{}, |
|
|
|
|
superFieldList:[], |
|
|
|
|
loadRouteType:false, |
|
|
|
|
queryParam:{}, |
|
|
|
|
moduleid:'', |
|
|
|
|
role:'', |
|
|
|
|
table:'', |
|
|
|
|
field:'fieldx,field_name,id', |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
|
|
|
|
|
|
let usercode = store.getters.userInfo.id |
|
|
|
|
this.loginrole(usercode) |
|
|
|
|
this.moduleid=this.$route.query.moduleid |
|
|
|
|
this.table="tablex,table_name,id,module_id="+this.$route.query.moduleid |
|
|
|
|
this.getSuperFieldList(); |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
@ -242,6 +260,27 @@ |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
ziduan(){ |
|
|
|
|
this.field="fieldx,field_name,id,table_id="+this.model.tableId; |
|
|
|
|
}, |
|
|
|
|
loginrole(id){ |
|
|
|
|
getAction(this.url.loginrole,{id:id}).then((res)=>{ |
|
|
|
|
if (res.success) { |
|
|
|
|
//重新计算分页问题 |
|
|
|
|
this.role=res.result; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
fanhui(){ |
|
|
|
|
this.$router.push({ |
|
|
|
|
/*返回产品*/ |
|
|
|
|
path: '/src/views/functionx/FunctionxList',/*在引号中填写返回vue*/ |
|
|
|
|
query:{ |
|
|
|
|
moduleid:this.moduleid |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
initDictConfig(){ |
|
|
|
|
}, |
|
|
|
|
getSuperFieldList(){ |
|
|
|
@ -265,7 +304,63 @@ |
|
|
|
|
fieldList.push({type:'int',value:'verisonStatus',text:'版本状态',dictCode:''}) |
|
|
|
|
fieldList.push({type:'string',value:'verison',text:'版本号',dictCode:''}) |
|
|
|
|
this.superFieldList = fieldList |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
loadParameter() { |
|
|
|
|
if (this.loadRouteType === false) { |
|
|
|
|
// this.id = this.$route.query.moduleid; |
|
|
|
|
// console.log("***********想看看") |
|
|
|
|
this.loadRouteType = true; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
loadData(arg) { |
|
|
|
|
if (!this.url.list) { |
|
|
|
|
this.$message.error("请设置url.list属性!"); |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
//加载数据 若传入参数1则加载第一页的内容 |
|
|
|
|
if (arg === 1) { |
|
|
|
|
this.ipagination.current = 1; |
|
|
|
|
} |
|
|
|
|
this.loadParameter(); |
|
|
|
|
var params = this.getQueryParams();//查询条件 |
|
|
|
|
this.loading = true; |
|
|
|
|
getAction(this.url.list, params).then((res) => { |
|
|
|
|
if (res.success) { |
|
|
|
|
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
|
|
|
|
this.dataSource = res.result.records || res.result; |
|
|
|
|
if (res.result.total) { |
|
|
|
|
this.ipagination.total = res.result.total; |
|
|
|
|
} else { |
|
|
|
|
this.ipagination.total = 0; |
|
|
|
|
} |
|
|
|
|
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------ |
|
|
|
|
} else { |
|
|
|
|
this.$message.warning(res.message) |
|
|
|
|
} |
|
|
|
|
}).finally(() => { |
|
|
|
|
this.loading = false |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
getQueryParams() { |
|
|
|
|
//获取查询条件 |
|
|
|
|
let sqp = {} |
|
|
|
|
if (this.superQueryParams) { |
|
|
|
|
sqp['superQueryParams'] = encodeURI(this.superQueryParams) |
|
|
|
|
sqp['superQueryMatchType'] = this.superQueryMatchType |
|
|
|
|
} |
|
|
|
|
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters); |
|
|
|
|
param.field = this.getQueryField(); |
|
|
|
|
param.pageNo = this.ipagination.current; |
|
|
|
|
param.pageSize = this.ipagination.pageSize; |
|
|
|
|
//param.id=this.id; |
|
|
|
|
param.functionId = this.$route.query.functionid; |
|
|
|
|
return filterObj(param); |
|
|
|
|
}, |
|
|
|
|
searchReset() { |
|
|
|
|
this.queryParam='' |
|
|
|
|
this.loadData(); |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|