Commit 849080ce authored by 樊国敬's avatar 樊国敬

setmenu

parent 91c4fddb
import Api from '@/plugins/request'
export default {
index:`${system}account/paged`,
index:`${system}/account/paged`,
paged(params){
return Api.post(`${system}account/paged`,params);
return Api.post(`${system}/account/paged`,params);
},
get(params){
return Api.get(`${system}account/get`,params);
return Api.get(`${system}/account/get`,params);
},
create(params){
return Api.post(`${system}account/create`,params);
return Api.post(`${system}/account/create`,params);
},
update(params){
return Api.post(`${system}account/update`,params);
return Api.post(`${system}/account/update`,params);
},
//删除:
delete(params) {
return Api.delete(`${system}account/delete`,{params:params});
return Api.delete(`${system}/account/delete`,{params:params});
},
}
\ No newline at end of file
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row class="rowTitle100">
<Col :span="24">
<FormItem :label="l('name')" prop="name">
<Input v-model="entity.name"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('upTitle')" prop="upId">
<!-- <InputNumber v-model="entity.upId"></InputNumber> -->
<span v-html="v.name"></span>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('type')" prop="type">
<Dictionary code="mes_xingchi_system.menu.type" :disabled="true" v-model="entity.type" type="radio"></Dictionary>
<!-- -->
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('url')" prop="url">
<Input v-model="entity.url"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('icon')" prop="icon">
<InputIcon v-model="entity.icon"></InputIcon>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('target')" prop="target">
<Dictionary code="mes_xingchi_system.menu.target" v-model="entity.target" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<Dictionary code="mes_xingchi_system.menu.status" v-model="entity.status" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('source')" prop="source">
<Dictionary code="mes_xingchi_system.menu.source" type="radio" disabled v-model="entity.source"></Dictionary>
</FormItem>
</Col>
<Col :span="6">
<FormItem :label="l('code')" prop="code">
<Input v-model="entity.code"></Input>
</FormItem>
</Col>
<Col :span="6">
<FormItem :label="l('app')" prop="app">
<Input v-model="entity.app" :disabled="entity.upId!=0"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('priority')" prop="priority">
<InputNumber v-model="entity.priority"></InputNumber>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('description')" prop="description">
<Input v-model="entity.description" type="textarea" :rows="3"></Input>
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
import Api from './api'
export default {
name: 'Add',
data() {
return {
disabled: false,
entity: {
id: 0,
name: '',
upId: 0,
type: 1,
code: '',
icon: '',
target: 0,
url: '',
status: 1,
description: '',
source: 0,
app: '',
priority: 0
},
rules: {
name: [{ required: true, message: '必填', trigger: 'blur' }]
}
}
},
props: {
v: Object
},
methods: {
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
this.disabled = true
Api.create(this.entity)
.then((r) => {
if (r.success) {
this.$Message.success('保存成功')
this.$emit('on-ok')
this.disabled = false
this.$refs.form.resetFields()
} else {
this.$Message.error('保存失败')
this.disabled = false
}
})
.catch((err) => {
this.disabled = false
this.$Message.error('保存失败')
console.warn(err)
})
}
})
},
handleClose() {
this.$emit('on-close')
},
l(key) {
key = 'menu' + '.' + key
return this.$t(key)
}
},
watch: {
v(val) {
// console.log(JSON.stringify(this.$u.clone(this.v)));
console.log(this.v)
this.entity.upId = this.v.id
this.entity.type = this.v.type + 1
this.entity.app = this.v.app
}
}
}
</script>
\ No newline at end of file
<template>
<div>
<DataGrid :columns="columns" :action="index" border :height="400" :conditions="conditions" @on-selection-change="selectionChange" :set="false" :high="false"></DataGrid>
<div>
<Button v-if="items.length>0" type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</div>
</div>
</template>
<script>
import Api from './api'
export default {
name: 'Add',
data() {
return {
index:Api.method,
disabled:false,
list: [],
controller:null,
keys:"",
apis: [],
items:[],
services:[],
conditions: {
keys: { op: 'url', value:null,default:true },
// level:{op:'GreaterThan',value:-1}
},
entity: {},
columns: [
// { key: 'id', title: this.l('id'), hide: true, align: 'left' },
{
type:"selection",
width: 60
},
{
key: 'title',
title: this.l('title'),
width: 200,
align: 'left',
high: true
}
,
{
key: 'httpMethod',
title: this.l('httpMethod'),
width: 100,
align: 'left',
high: true
},
{
key: 'url',
title: this.l('url'),
width: 350,
align: 'left',
easy: true,
high: true
},
{
key: 'methodDescription',
title: this.l('methodDescription'),
align: 'left',
tooltip:true,
high: true
},
// {
// key: 'service',
// title: this.l('service'),
// width: 150,
// align: 'left',
// easy: true,
// high: true
// },
// {
// key: 'controller',
// title: this.l('controller'),
// width: 150,
// align: 'left',
// easy: true,
// high: true
// },
// {
// key: 'level',
// title: this.l('level'),
// width: 80,
// align: 'left',
// high: true
// },
// {
// key: 'creatorUserId',
// title: this.l('creatorUserId'),
// hide: true,
// align: 'left'
// },
// {
// key: 'creationTime',
// title: this.l('creationTime'),
// align: 'left',
// width: 180,
// high: true
// }
]
}
},
props: {
v: Object
},
methods: {
groupBy(array, f) {
// debugger;
const groups = {}
array.forEach(function(o) {
const group = JSON.stringify(f(o))
groups[group] = groups[group] || []
groups[group].push(o)
})
return Object.keys(groups).map(function(group) {
return groups[group]
})
},
getService() {
let map = [];
this.list.forEach((u) => {
if(map.indexOf(u.service)==-1){
map.push(u.service);
}
})
return map
},
getControllers(service){
var items=[];
var apis=this.list.filter(u=>{
return u.service==service
});
apis.forEach(u=>{
if(!items.some(li=>{
return li.controller==u.controller
})) {
items.push(u);
}
})
return items;
},
search(){
if(this.controller){
this.keys=this.controller;
}
this.apis=this.list.filter(u=>{
return u.url.toLowerCase().indexOf(this.keys.toLowerCase())>-1;
})
},
handleSubmit(){
let apis=[];
this.items.map((u,i)=>{
var api={
upId:this.v.id,
url:u.url,
priority:i,
name:u.title|u.methodDescription,
type:4,
target:0,
status:1,
source:2,
app:this.v.app,
methodId:u.id
}
apis.push(api);
})
Api.addApis(apis).then(r=>{
if(r.result){
this.$Message.success("接口添加成功!")
this.$emit('on-ok')
}
})
},
handleClose(){
this.$emit('on-close')
},
selectionChange(items){
console.log(items);
this.items=items;
},
l(key) {
key = 'method' + '.' + key
return this.$t(key)
}
},
computed: {
},
watch: {
v(val) {
console.log(this.v)
// this.entity = v
// this.loadApi()
}
}
}
</script>
\ No newline at end of file
import Api from '@/plugins/request'
export default {
index: `${system}/menu/paged`,
method: `${system}/method/paged`,
paged(params) {
return Api.post(`${system}/menu/paged`, params);
},
get(params) {
return Api.get(`${system}/menu/get`, params);
},
getSystem() {
var params={"pageSize":2000,"conditions":[{"fieldName":"Type","fieldValue":"0","conditionalType":"Equal"}]}
return Api.post(`${system}/menu/list`, params);
},
getApi(params) {
// var params={"pageSize":2000,"conditions":[{"fieldName":"Level","fieldValue":"-1","conditionalType":"Than"}]}
return Api.post(`${system}/method/list`, params);
},
getTree() {
var params={"pageSize":2000,"sortBy":"Priority","isDesc":false,"conditions":[{"fieldName":"Type","fieldValue":"3","conditionalType":"LessThan"}]}
return Api.post(`${system}/menu/getTree`, params);
},
importRouters(params) {
return Api.post(`${system}/menu/import`, params);
},
create(params) {
return Api.post(`${system}/menu/create`, params);
},
addApis(params) {
return Api.post(`${system}/menu/addApis`, params);
},
update(params) {
return Api.post(`${system}/menu/update`, params);
},
//删除:
delete(params) {
return Api.delete(`${system}/menu/delete`, {
params: params
});
},
}
\ No newline at end of file
<template>
<div class="detail">
<Row>
<Filed :span="12" :name="l('name')">{{entity.name}}</Filed>
<Filed :span="12" :name="l('upId')">{{entity.upId}}</Filed>
<Filed :span="12" :name="l('type')">{{entity.type}}</Filed>
<Filed :span="12" :name="l('code')">{{entity.code}}</Filed>
<Filed :span="12" :name="l('icon')">{{entity.icon}}</Filed>
<Filed :span="12" :name="l('target')">{{entity.target}}</Filed>
<Filed :span="12" :name="l('url')">{{entity.url}}</Filed>
<Filed :span="12" :name="l('status')">{{entity.status}}</Filed>
<Filed :span="24" :name="l('description')">{{entity.description}}</Filed>
<Filed :span="12" :name="l('source')">{{entity.source}}</Filed>
<Filed :span="12" :name="l('app')">{{entity.app}}</Filed>
<Filed :span="12" :name="l('priority')">{{entity.priority}}</Filed>
</Row>
</div>
</template>
<script>
import Api from './api'
export default {
name: 'Add',
data() {
return {
entity: {},
rules: {
name: [{ required: true, message: '必填', trigger: 'blur' }],
code: [{ required: true, message: '必填', trigger: 'blur' }]
}
}
},
props: {
eid: Number
},
methods: {
load(v) {
Api.get({ id: v }).then(r => {
this.entity = r.result;
this.$emit('on-load')
})
},
handleClose() {
this.$emit('on-close')
},
l(key) {
key = "menu" + "." + key;
return this.$t(key)
}
},
watch: {
eid(v) {
if (v != 0) {
this.load(v);
}
}
}
}
</script>
\ No newline at end of file
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row class="rowTitle100">
<Col :span="24">
<FormItem :label="l('name')" prop="name">
<Input v-model="entity.name"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('type')" prop="type">
<Dictionary
code="mes_xingchi_system.menu.type"
v-model="entity.type"
type="radio"
></Dictionary>
<!-- -->
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('url')" prop="url">
<Input v-model="entity.url"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('icon')" prop="icon">
<InputIcon v-model="entity.icon"></InputIcon>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('target')" prop="target">
<Dictionary code="mes_xingchi_system.menu.target" v-model="entity.target" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<Dictionary code="mes_xingchi_system.menu.status" v-model="entity.status" type="radio"></Dictionary>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('source')" prop="source">
<Dictionary
code="mes_xingchi_system.menu.source"
type="radio"
disabled
v-model="entity.source"
></Dictionary>
</FormItem>
</Col>
<Col :span="6">
<FormItem :label="l('code')" prop="code">
<Input v-model="entity.code"></Input>
</FormItem>
</Col>
<Col :span="6">
<FormItem :label="l('app')" prop="app">
<Input v-model="entity.app" :disabled="entity.upId!=0"></Input>
</FormItem>
</Col>
<Col :span="12">
<FormItem :label="l('priority')" prop="priority">
<InputNumber v-model="entity.priority"></InputNumber>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('description')" prop="description">
<Input v-model="entity.description" type="textarea" :rows="3"></Input>
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
import Api from './api'
export default {
name: 'Edit',
data() {
return {
disabled: false,
entity: {
color: ''
},
rules: {
name: [{ required: true, message: '必填', trigger: 'blur' }]
}
}
},
props: {
eid: Number,
v: Object
},
methods: {
load(v) {
Api.get({ id: v }).then((r) => {
this.entity = r.result
this.$emit('on-load')
})
},
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
this.disabled = true
Api.update(this.entity)
.then((r) => {
if (r.success) {
this.$Message.success('保存成功')
this.$emit('on-ok')
this.disabled = false
this.$refs.form.resetFields()
} else {
this.$Message.error('保存失败')
this.disabled = false
}
})
.catch((err) => {
this.disabled = false
this.$Message.error('保存失败')
console.warn(err)
})
}
})
},
handleClose() {
this.$emit('on-close')
},
l(key) {
key = 'menu' + '.' + key
return this.$t(key)
}
},
watch: {
eid(v) {
if (v != 0) {
this.load(v)
}
}
}
}
</script>
\ No newline at end of file
<template>
<div>
<TreeGrid :columns="columns" ref="grid" :items="list">
<template slot="buttons">
<Button type="primary" @click="add()">新增系统</Button>
<Button type="primary" @click="importModal=true">导入菜单</Button>
</template>
</TreeGrid>
<Modal v-model="addModal" title="新增" width="1000" footer-hide>
<Add @on-close="cancel" :v="curModel" @on-ok="addOk" />
</Modal>
<Modal v-model="apiModal" title="设置接口" width="1000" footer-hide>
<AddApi @on-close="cancel" :v="curModel" @on-ok="apiOk" />
</Modal>
<Modal v-model="editModal" title="编辑" width="1000" footer-hide>
<Edit :eid="curId" :v="curModel" @on-close="cancel" @on-ok="addOk" />
</Modal>
<Modal v-model="detailModal" title="详情">
<Detail :eid="curId" />
</Modal>
<Modal v-model="importModal" title="导入系统菜单" width="800" @on-ok="importOk">
<h1 v-if="systemList.length==0">请先创建系统</h1>
<div v-else>
<Select placeholder="请选择系统" v-model="systemId" :data="systemList">
<Option v-for="(li,i) in systemList" :value="li.id" :key="li.id">{{li.name}}</Option>
</Select>
<div class="h400">
<json-viewer :value="systemRouters" :expand-depth="5"></json-viewer>
</div>
</div>
</Modal>
</div>
</template>
<script>
import Api from './api'
import Add from './add'
import AddApi from './addApi'
import Edit from './edit'
import Detail from './detail'
import Search from './search'
import { appRouter } from '@/router/routes'
import JsonViewer from 'vue-json-viewer'
export default {
name: 'list',
components: {
Add,
AddApi,
Edit,
Detail,
Search,
JsonViewer
},
data() {
return {
action: Api.index,
easySearch: {
keys: { op: 'name,code,icon,url,description,app', value: null }
},
curModel: {
id: 0,
type: 0,
name: '根级'
},
testModal: true,
addModal: false,
apiModal: false,
editModal: false,
detailModal: false,
deletelModal: false,
importModal: false,
systemId: 0,
systemList: [],
list: [],
systemRouters: appRouter,
curId: 0,
columns: [
{
key: 'name',
title: this.l('name'),
align: 'left',
easy: true,
high: true
},
// { key: 'upId', title: this.l('upId'), align: 'left', high: true ,hide:true},
{
key: 'type',
width: 60,
title: this.l('type'),
align: 'center',
high: true,
code: 'mes_xingchi_system.menu.type'
},
{
key: 'code',
title: this.l('code'),
align: 'left',
easy: true,
high: true
},
{
key: 'icon',
title: this.l('icon'),
align: 'center',
type: 'icons',
easy: true,
high: true
},
{
key: 'target',
title: this.l('target'),
align: 'center',
high: true,
code: 'mes_xingchi_system.menu.target'
},
{
key: 'url',
title: this.l('url'),
align: 'left',
easy: true,
high: true
},
{
key: 'status',
title: this.l('status'),
align: 'center',
high: true,
code: 'mes_xingchi_system.menu.status'
},
{
key: 'description',
title: this.l('description'),
align: 'left',
easy: true,
high: true
},
{
key: 'source',
title: this.l('source'),
align: 'left',
high: true,
code: 'mes_xingchi_system.menu.source'
},
{
key: 'app',
title: this.l('app'),
align: 'left',
easy: true,
high: true
},
{
key: 'priority',
title: this.l('priority'),
align: 'left',
high: true
},
{
title: '操作',
key: 'id',
width: 120,
align: 'center',
render: (h, params) => {
return h('div', { class: 'action' }, [
h(
'op',
{
attrs: {
oprate: 'add'
},
on: { click: () => this.add(params.row) }
},
'新增'
),
h(
'op',
{
attrs: {
oprate: 'edit'
},
on: { click: () => this.edit(params.row) }
},
'编辑'
),
h(
'op',
{
attrs: {
oprate: 'delete'
},
on: { click: () => this.removeOk(params.row) }
},
'删除'
)
])
}
}
]
}
},
mounted() {
this.init()
},
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
},
methods: {
init() {
Api.getSystem().then((r) => {
this.systemList = r.result
})
Api.getTree().then((r) => {
this.list = r.result
})
},
add(row) {
if (row) {
if (row.type == 2) {
this.apiModal = true
this.curModel = {
id: row.id,
name: row.name,
type: row.type,
app: row.app
}
return
} else {
this.addModal = true
this.curModel = {
id: row.id,
name: row.name,
type: row.type,
app: row.app
}
}
} else {
this.addModal = true
this.curModel = {
id: 0,
name: '根级',
type: -1,
app: ''
}
}
},
addOk() {
this.init()
this.addModal = false
this.detailModal = false
this.editModal = false
this.curId = 0
},
apiOk() {
this.apiModal = false
this.init()
},
importMenu() {
this.importModal = true
},
importOk() {
Api.importRouters({
id: this.systemId,
routers: appRouter
}).then((r) => {
console.warn(r)
this.importModal = false
})
},
search() {
this.$refs.grid.reload(this.easySearch)
},
detail(id) {
this.detailModal = true
this.curId = id
},
edit(row) {
this.editModal = true
this.curId = row.id
this.curModel = row
},
remove(id) {
this.deletelModal = true
this.curId = id
},
removeOk(row) {
Api.delete({ id: row.id }).then((r) => {
if (r.success) {
this.init()
this.deletelModal = false
this.$Message.success('删除成功')
}
})
},
removeCancel() {
this.deletelModal = false
},
cancel() {
this.curId = 0
this.addModal = false
this.detailModal = false
this.editModal = false
this.deletedlModal = false
},
l(key) {
/*
menu:{
id:'',
creationTime:'',
creatorUserId:'',
lastModificationTime:'',
lastModifierUserId:'',
isDeleted:'',
deletionTime:'',
deleterUserId:'',
name:'名称',
upId:'父级',
type:'类型',
code:'编码',
icon:'图标',
target:'打开方式',
url:'地址',
status:'显示',
description:'备注',
source:'来源',
app:'系统',
priority:'排序',
}
*/
let vkey = 'menu' + '.' + key
return this.$t(vkey) || key
}
}
}
</script>
<style lang="less">
</style>
\ No newline at end of file
<template>
<Form ref="form" :model="condition" :label-width="90">
<Row>
<Col :span="12" :v-if="condition.id.show"><FormItem :label="l('id')" prop="id"> <Input v-model="condition.id.value"> </Input>
</FormItem></Col>
<Col :span="12" :v-if="condition.creationTime.show"><FormItem :label="l('creationTime')" prop="creationTime"> <DatePicker type="daterange" v-model="condition.creationTime.value"></DatePicker>
</FormItem></Col>
<Col :span="12" :v-if="condition.creatorUserId.show"><FormItem :label="l('creatorUserId')" prop="creatorUserId"> <Input v-model="condition.creatorUserId.value"> </Input>
</FormItem></Col>
<Col :span="12" :v-if="condition.lastModificationTime.show"><FormItem :label="l('lastModificationTime')" prop="lastModificationTime"> <DatePicker type="daterange" v-model="condition.lastModificationTime.value"></DatePicker>
</FormItem></Col>
<Col :span="12" :v-if="condition.lastModifierUserId.show"><FormItem :label="l('lastModifierUserId')" prop="lastModifierUserId"> <Input v-model="condition.lastModifierUserId.value"> </Input>
</FormItem></Col>
<Col :span="12" :v-if="condition.isDeleted.show"><FormItem :label="l('isDeleted')" prop="isDeleted"> <Input v-model="condition.isDeleted.value"> </Input>
</FormItem></Col>
<Col :span="12" :v-if="condition.deletionTime.show"><FormItem :label="l('deletionTime')" prop="deletionTime"> <DatePicker type="daterange" v-model="condition.deletionTime.value"></DatePicker>
</FormItem></Col>
<Col :span="12" :v-if="condition.deleterUserId.show"><FormItem :label="l('deleterUserId')" prop="deleterUserId"> <Input v-model="condition.deleterUserId.value"> </Input>
</FormItem></Col>
<Col :span="12" :v-if="condition.name.show"><FormItem :label="l('name')" prop="name"> <Input v-model="condition.name.value"> </Input>
</FormItem></Col>
<Col :span="12" :v-if="condition.upId.show"><FormItem :label="l('upId')" prop="upId"> <Input v-model="condition.upId.value"> </Input>
</FormItem></Col>
<Col :span="12" :v-if="condition.type.show"><FormItem :label="l('type')" prop="type"> <Dictionary code="mes_xingchi_system.menu.type" v-model="condition.type.value"></Dictionary>
</FormItem></Col>
<Col :span="12" :v-if="condition.code.show"><FormItem :label="l('code')" prop="code"> <Input v-model="condition.code.value"> </Input>
</FormItem></Col>
<Col :span="12" :v-if="condition.icon.show"><FormItem :label="l('icon')" prop="icon"> <Input v-model="condition.icon.value"> </Input>
</FormItem></Col>
<Col :span="12" :v-if="condition.target.show"><FormItem :label="l('target')" prop="target"> <Dictionary code="mes_xingchi_system.menu.target" v-model="condition.target.value"></Dictionary>
</FormItem></Col>
<Col :span="12" :v-if="condition.url.show"><FormItem :label="l('url')" prop="url"> <Input v-model="condition.url.value"> </Input>
</FormItem></Col>
<Col :span="12" :v-if="condition.status.show"><FormItem :label="l('status')" prop="status"> <Dictionary code="mes_xingchi_system.menu.status" v-model="condition.status.value"></Dictionary>
</FormItem></Col>
<Col :span="24" :v-if="condition.description.show"><FormItem :label="l('description')" prop="description"> <Input v-model="condition.description.value"> </Input>
</FormItem></Col>
<Col :span="12" :v-if="condition.source.show"><FormItem :label="l('source')" prop="source"> <Dictionary code="mes_xingchi_system.menu.source" v-model="condition.source.value"></Dictionary>
</FormItem></Col>
<Col :span="12" :v-if="condition.app.show"><FormItem :label="l('app')" prop="app"> <Input v-model="condition.app.value"> </Input>
</FormItem></Col>
<Col :span="12" :v-if="condition.priority.show"><FormItem :label="l('priority')" prop="priority"> <Input v-model="condition.priority.value"> </Input>
</FormItem></Col>
</Row>
</Form>
</template>
<script>
import Api from './api'
export default {
name: 'Add',
data() {
return {
condition: {
id:{op:"Equal",value:null,show:false},
creationTime:{op:"Range",value:null,show:false},
creatorUserId:{op:"Equal",value:null,show:false},
lastModificationTime:{op:"Range",value:null,show:false},
lastModifierUserId:{op:"Equal",value:null,show:false},
isDeleted:{op:"Equal",value:null,show:false},
deletionTime:{op:"Range",value:null,show:false},
deleterUserId:{op:"Equal",value:null,show:false},
name:{op:"Equal",value:null,show:true},
upId:{op:"Equal",value:null,show:true},
type:{op:"Equal",value:null,show:true},
code:{op:"Equal",value:null,show:true},
icon:{op:"Equal",value:null,show:true},
target:{op:"Equal",value:null,show:true},
url:{op:"Equal",value:null,show:true},
status:{op:"Equal",value:null,show:true},
description:{op:"Equal",value:null,show:true},
source:{op:"Equal",value:null,show:true},
app:{op:"Equal",value:null,show:true},
priority:{op:"Equal",value:null,show:true},
},
}
},
methods: {
handleClose() {
this.$emit('on-close')
},
l(key) {
key = "menu" + "." + key;
return this.$t(key)
}
}
}
</script>
\ No newline at end of file
import Api from '@/plugins/request'
export default {
index:`${system}setmenu/paged`,
index:`${system}/setmenu/paged`,
paged(params){
return Api.post(`${system}setmenu/paged`,params);
return Api.post(`${system}/setmenu/paged`,params);
},
get(params){
return Api.get(`${system}setmenu/get`,params);
return Api.get(`${system}/setmenu/get`,params);
},
create(params){
return Api.post(`${system}setmenu/create`,params);
return Api.post(`${system}/setmenu/create`,params);
},
update(params){
return Api.post(`${system}setmenu/update`,params);
return Api.post(`${system}/setmenu/update`,params);
},
//删除:
delete(params) {
return Api.delete(`${system}setmenu/delete`,{params:params});
return Api.delete(`${system}/setmenu/delete`,{params:params});
},
}
\ No newline at end of file
......@@ -35,7 +35,7 @@ const systemApi = {
//占位符自动替换:
window.systemUrl = `http://${address}:10020/api/services/app`; //System-api 系统管理(基础数据)
window.authUrl = `http://${address}:10010`; //Authentication-api //统一登陆认证
window.system=`http://${address}:10010/api/services/app`;//多租户后台系统
window.designUrl = `http://${address}:10030/api/services/app`; //Process-api 工艺规程
window.PlanUrl = `http://${address}:10050/api/services/app`; //Process-api
window.routeUrl = `http://${address}:10050/api/services/app`; //Process-api
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment