commit
6a47584518
15 changed files with 634 additions and 23806 deletions
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,335 @@ |
||||
<template> |
||||
<a-card :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.functionTemplateName"></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.functionTemplateEnName"></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.functionType" dictCode="function_type" placeholder="请选择功能类型"/> |
||||
</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.workStatus" dictCode="work_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> |
||||
|
||||
<!-- 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" |
||||
:columns="columns" |
||||
:dataSource="dataSource" |
||||
:pagination="ipagination" |
||||
:loading="loading" |
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange1}" |
||||
class="j-table-force-nowrap" |
||||
@change="handleTableChange"> |
||||
|
||||
<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> |
||||
|
||||
</a-table> |
||||
</div> |
||||
|
||||
|
||||
</a-card> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
import '@/assets/less/TableExpand.less' |
||||
import { mixinDevice } from '@/utils/mixin' |
||||
import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
||||
import {getAction} from "@api/manage"; |
||||
import {filterObj} from "@/utils/util"; |
||||
export default { |
||||
name: 'FunctionTemplateList', |
||||
mixins:[JeecgListMixin, mixinDevice], |
||||
components: { |
||||
}, |
||||
data () { |
||||
return { |
||||
description: '功能模板管理管理页面', |
||||
// 表头 |
||||
columns: [ |
||||
{ |
||||
title: '#', |
||||
dataIndex: '', |
||||
key:'rowIndex', |
||||
width:60, |
||||
align:"center", |
||||
customRender:function (t,r,index) { |
||||
return parseInt(index)+1; |
||||
} |
||||
}, |
||||
{ |
||||
title:'模块模板类型', |
||||
align:"center", |
||||
dataIndex: 'modulextypeId_dictText' |
||||
}, |
||||
{ |
||||
title:'中文名称', |
||||
align:"center", |
||||
dataIndex: 'functionTemplateName' |
||||
}, |
||||
{ |
||||
title:'英文名称', |
||||
align:"center", |
||||
dataIndex: 'functionTemplateEnName' |
||||
}, |
||||
{ |
||||
title:'功能编码', |
||||
align:"center", |
||||
dataIndex: 'functionTemplateCode' |
||||
}, |
||||
{ |
||||
title:'功能类型', |
||||
align:"center", |
||||
dataIndex: 'functionTemplateType_dictText' |
||||
}, |
||||
{ |
||||
title:'功能描述', |
||||
align:"center", |
||||
dataIndex: 'functionTemplateDescribe' |
||||
}, |
||||
{ |
||||
title:'分析图', |
||||
align:"center", |
||||
dataIndex: 'diagrams', |
||||
scopedSlots: {customRender: 'imgSlot'} |
||||
}, |
||||
// { |
||||
// title:'用户角色', |
||||
// align:"center", |
||||
// dataIndex: 'userRole_dictText' |
||||
// }, |
||||
// { |
||||
// title:'责任人', |
||||
// align:"center", |
||||
// dataIndex: 'managerUsers_dictText' |
||||
// }, |
||||
{ |
||||
title:'任务等级', |
||||
align:"center", |
||||
dataIndex: 'workLevel_dictText' |
||||
}, |
||||
{ |
||||
title:'任务状态', |
||||
align:"center", |
||||
dataIndex: 'workStatus_dictText' |
||||
}, |
||||
{ |
||||
title:'发布时间', |
||||
align:"center", |
||||
dataIndex: 'publishTime' |
||||
}, |
||||
{ |
||||
title:'开始时间', |
||||
align:"center", |
||||
dataIndex: 'startTime', |
||||
customRender:function (text) { |
||||
return !text?"":(text.length>10?text.substr(0,10):text) |
||||
} |
||||
}, |
||||
{ |
||||
title:'任务时长', |
||||
align:"center", |
||||
dataIndex: 'duration' |
||||
}, |
||||
{ |
||||
title:'创建人', |
||||
align:"center", |
||||
dataIndex: 'createBy_dictText' |
||||
}, |
||||
|
||||
], |
||||
url: { |
||||
list: "/functiontemplate/functionTemplate/list1", |
||||
delete: "/functiontemplate/functionTemplate/delete", |
||||
deleteBatch: "/functiontemplate/functionTemplate/deleteBatch", |
||||
exportXlsUrl: "/functiontemplate/functionTemplate/exportXls", |
||||
importExcelUrl: "functiontemplate/functionTemplate/importExcel", |
||||
|
||||
}, |
||||
dictOptions:{}, |
||||
superFieldList:[], |
||||
loadRouteType:false, |
||||
queryParam:{}, |
||||
} |
||||
}, |
||||
created() { |
||||
this.getSuperFieldList(); |
||||
}, |
||||
computed: { |
||||
importExcelUrl: function(){ |
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
||||
}, |
||||
}, |
||||
methods: { |
||||
onSelectChange1(selectedRowKeys, selectionRows) { |
||||
this.selectedRowKeys = selectedRowKeys; |
||||
this.selectionRows = selectionRows; |
||||
let ids = ""; |
||||
for (var a = 0; a < this.selectionRows.length; a++) { |
||||
ids += this.selectionRows[a].id + ","; |
||||
} |
||||
console.log(ids,"------------*****---") |
||||
this.$emit('onChangeRowKey',ids) |
||||
}, |
||||
fanhui(){ |
||||
this.$router.push({ |
||||
/*返回产品*/ |
||||
path: '/src/views/moduletype/ModuleTypeList', |
||||
}); |
||||
}, |
||||
initDictConfig(){ |
||||
}, |
||||
getSuperFieldList(){ |
||||
let fieldList=[]; |
||||
fieldList.push({type:'string',value:'modulextypeId',text:'模块模板类型id',dictCode:''}) |
||||
fieldList.push({type:'string',value:'functionTemplateName',text:'中文名称',dictCode:''}) |
||||
fieldList.push({type:'string',value:'functionTemplateEnName',text:'英文名称',dictCode:''}) |
||||
fieldList.push({type:'string',value:'functionTemplateCode',text:'功能编码',dictCode:''}) |
||||
fieldList.push({type:'int',value:'functionTemplateType',text:'功能类型',dictCode:''}) |
||||
fieldList.push({type:'string',value:'functionTemplateDescribe',text:'功能描述',dictCode:''}) |
||||
fieldList.push({type:'string',value:'diagrams',text:'分析图',dictCode:''}) |
||||
fieldList.push({type:'sel_user',value:'userRole',text:'用户角色'}) |
||||
fieldList.push({type:'sel_user',value:'managerUsers',text:'责任人'}) |
||||
fieldList.push({type:'int',value:'workLevel',text:'任务等级',dictCode:''}) |
||||
fieldList.push({type:'int',value:'workStatus',text:'任务状态',dictCode:''}) |
||||
fieldList.push({type:'datetime',value:'publishTime',text:'发布时间'}) |
||||
fieldList.push({type:'date',value:'startTime',text:'开始时间'}) |
||||
fieldList.push({type:'double',value:'duration',text:'任务时长',dictCode:''}) |
||||
this.superFieldList = fieldList |
||||
}, |
||||
loadParameter() { |
||||
if (this.loadRouteType === false) { |
||||
this.id = this.$route.query.type; |
||||
// console.log("***********想看看") |
||||
this.loadRouteType = true; |
||||
} |
||||
}, |
||||
add(){ |
||||
|
||||
}, |
||||
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.modulextypeId = this.$route.query.type; |
||||
return filterObj(param); |
||||
}, |
||||
searchReset() { |
||||
this.queryParam='' |
||||
this.loadData(); |
||||
}, |
||||
} |
||||
} |
||||
</script> |
||||
<style scoped> |
||||
@import '~@assets/less/common.less'; |
||||
</style> |
@ -0,0 +1,78 @@ |
||||
<template> |
||||
<j-modal |
||||
:title="title" |
||||
:width="width" |
||||
:visible="visible" |
||||
switchFullscreen |
||||
@ok="handleOk" |
||||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
||||
@cancel="handleCancel" |
||||
cancelText="关闭"> |
||||
<!-- <functionx-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></functionx-form>--> |
||||
<function-template-list ref="realForm" @ok="submitCallback" :disabled="disableSubmit" @onChangeRowKey="chuancan"></function-template-list> |
||||
</j-modal> |
||||
</template> |
||||
|
||||
<script> |
||||
|
||||
|
||||
import FunctionTemplateList from "./FunctionTemplateList"; |
||||
import {getAction, postAction} from "../../../api/manage"; |
||||
export default { |
||||
name: 'FunctionxModal', |
||||
components: { |
||||
FunctionTemplateList |
||||
}, |
||||
data () { |
||||
return { |
||||
title:'', |
||||
width:800, |
||||
visible: false, |
||||
ids:'', |
||||
disableSubmit: false, |
||||
url:{ |
||||
add:"/functionx/functionx/muban" |
||||
} |
||||
} |
||||
}, |
||||
methods: { |
||||
add () { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.add(); |
||||
}) |
||||
}, |
||||
edit (record) { |
||||
this.visible=true |
||||
this.$nextTick(()=>{ |
||||
this.$refs.realForm.edit(record); |
||||
}) |
||||
}, |
||||
close () { |
||||
this.$emit('close'); |
||||
this.visible = false; |
||||
}, |
||||
chuancan(res){ |
||||
this.ids=res; |
||||
}, |
||||
handleOk () { |
||||
getAction(this.url.add,{id:this.$route.query.moduleid,ids:this.ids}).then((res)=> { |
||||
if (res.success) { |
||||
this.$message.success(res.message); |
||||
} else { |
||||
this.$message.warning(res.message); |
||||
} |
||||
this.$emit('valueChange', 1) |
||||
this.close() |
||||
}) |
||||
}, |
||||
submitCallback(){ |
||||
this.$emit('ok'); |
||||
this.visible = false; |
||||
}, |
||||
handleCancel () { |
||||
this.close() |
||||
} |
||||
} |
||||
} |
||||
</script> |
@ -0,0 +1,6 @@ |
||||
package org.jeecg.modules.demo.functionx.entity; |
||||
|
||||
public interface RoleConstant { |
||||
public final String adminId="f6817f48af4fb3af11b9e8bf182f618b"; |
||||
public final String managementId="1645284981182980098"; |
||||
} |
Loading…
Reference in new issue