Commit 87f823a1 authored by kangzhenfei's avatar kangzhenfei

saas--数据字典

parent 0507bb2a
......@@ -76,7 +76,7 @@ export default [
"app": "App",
"priority": 0,
"id": 419,
"title": "资源管理",
"title": "菜单管理",
"expand": true,
"upId": 410,
"lay": 2,
......@@ -112,6 +112,30 @@ export default [
"closable": true
}
},
{
"name": "system-dic",
"type": 2,
"code": "",
"icon": "",
"url": "/system/dic",
"status": 1,
"description": "",
"source": 0,
"app": "App",
"priority": 0,
"id": 412,
"title": "数据字典",
"expand": true,
"upId": 410,
"lay": 2,
"path": "/system/dic",
"header": "home",
"meta": {
"auth": false,
"title": "数据字典",
"closable": true
}
},
{
"name": "system-host",
"type": 2,
......
import api from '@/plugins/request'
// const u=(path)=>`${systemUrl}/Dictionary/${path}`
const u=(path)=>`${systemNew}/dictionary/${path}`
export default {
getChildren(id) {
return api.get(u("getChildren"), { id })
},
getTree(){
return api.get(u('getTree'))
},
setColor(paras) {
return api.post(u("setColor"), {Dictionary:paras})
},
setSort(paras) {
return api.post(u("setSort"), paras)
},
save(paras) {
return api.post(u("createOrUpdate"), {Dictionary:paras})
},
// getChildren(id) {
// return api.get(u("GetChildren"), { id })
// },
// getTree(){
// return api.get(u('GetTree'))
// },
// setColor(paras) {
// return api.post(u("SetColor"), {Dictionary:paras})
// },
// setSort(paras) {
// return api.post(u("SetSort"), paras)
// },
// save(paras) {
// return api.post(u("CreateOrUpdate"), {Dictionary:paras})
// },
}
\ No newline at end of file
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row class="rowTitle100">
<FormItem label="类别" prop="typeId">
<RadioGroup v-model="entity.typeId">
<Radio :label="0" disabled>系统</Radio>
<Radio :label="1" disabled>分类</Radio>
<Radio :label="2" disabled>字典</Radio>
<Radio :label="3" disabled>字典项</Radio>
</RadioGroup>
</FormItem>
</Row>
<Row class="rowTitle100">
<FormItem label="名称" prop="name">
<Input v-model="entity.name">
<ColorPicker v-model="entity.color" slot="prepend" transfer size="small" transfer recommend />
</Input>
</FormItem>
</Row>
<Row class="rowTitle100">
<FormItem label="编码" prop="code">
<Input v-model="entity.code" />
</FormItem>
</Row>
<Row class="rowTitle100">
<FormItem label="图标" prop="icon">
<InputIcon v-model="entity.icon"></InputIcon>
</FormItem>
</Row>
<FormItem label="状态" prop="number">
<RadioGroup v-model="entity.status">
<Radio :label="0">启用</Radio>
<Radio :label="1">禁用(名称和值可以启用或禁用,但不能删除)</Radio>
</RadioGroup>
</FormItem>
<FormItem label="锁定" prop="number">
<RadioGroup v-model="entity.isStatic">
<Radio :label="0">不锁定</Radio>
<Radio :label="1">锁定(锁定后不可改变名称和值,不能删除)</Radio>
</RadioGroup>
</FormItem>
<Row class="rowTitle100">
<FormItem label="描述" prop="description">
<Input v-model="entity.description" type="textarea" :rows="3"></Input>
</FormItem>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
export default {
name: 'Edit',
data() {
return {
entity: this.v,
rules: {
name: [{ required: true, message: '必填', trigger: 'blur' }],
code: [{ required: true, message: '必填', trigger: 'blur' }]
}
}
},
props: {
v: Object
},
methods: {
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
var url2 = `${systemUrl}/Dictionary/createorupdate`
this.$api.post(url2, { Dictionary: this.entity }).then((r) => {
if (r.success) {
this.$Message.success('保存成功')
this.$emit('on-ok')
}
})
}
})
},
handleClose() {
this.$emit('on-close')
}
},
watch: {
v(v) {
this.entity = this.v
console.info(this.entity)
}
}
}
</script>
This diff is collapsed.
import api from '@/plugins/request'
// const u=(path)=>`${systemUrl}/Dictionary/${path}`
const u=(path)=>`${systemNew}/api/services/app/dictionary/${path}` //49.232.68.61:10130/api/services/app/dictionary/getall
export default {
getChildren(id) {
return api.get(u("getchildren"), { id })
},
getTree(){
return api.get(u('gettree'))
},
setColor(paras) {
return api.post(u("setcolor"), {Dictionary:paras})
},
setSort(paras) {
return api.post(u("setsort"), paras)
},
save(paras) {
return api.post(u("createorupdate"), {Dictionary:paras})
},
// getChildren(id) {
// return api.get(u("GetChildren"), { id })
// },
// getTree(){
// return api.get(u('GetTree'))
// },
// setColor(paras) {
// return api.post(u("SetColor"), {Dictionary:paras})
// },
// setSort(paras) {
// return api.post(u("SetSort"), paras)
// },
// save(paras) {
// return api.post(u("CreateOrUpdate"), {Dictionary:paras})
// },
}
\ No newline at end of file
<template>
<Form ref="form" :model="entity" :rules="rules" :label-width="100">
<Row class="rowTitle100">
<FormItem label="类别" prop="typeId">
<RadioGroup v-model="entity.typeId">
<Radio :label="0" disabled>系统</Radio>
<Radio :label="1" disabled>分类</Radio>
<Radio :label="2" disabled>字典</Radio>
<Radio :label="3" disabled>字典项</Radio>
</RadioGroup>
</FormItem>
</Row>
<Row class="rowTitle100">
<FormItem label="名称" prop="name">
<Input v-model="entity.name">
<ColorPicker v-model="entity.color" slot="prepend" transfer size="small" transfer recommend />
</Input>
</FormItem>
</Row>
<Row class="rowTitle100">
<FormItem label="编码" prop="code">
<Input v-model="entity.code" />
</FormItem>
</Row>
<Row class="rowTitle100">
<FormItem label="图标" prop="icon">
<InputIcon v-model="entity.icon"></InputIcon>
</FormItem>
</Row>
<FormItem label="状态" prop="number">
<RadioGroup v-model="entity.status">
<Radio :label="0">启用</Radio>
<Radio :label="1">禁用(名称和值可以启用或禁用,但不能删除)</Radio>
</RadioGroup>
</FormItem>
<FormItem label="锁定" prop="number">
<RadioGroup v-model="entity.isStatic">
<Radio :label="0">不锁定</Radio>
<Radio :label="1">锁定(锁定后不可改变名称和值,不能删除)</Radio>
</RadioGroup>
</FormItem>
<Row class="rowTitle100">
<FormItem label="描述" prop="description">
<Input v-model="entity.description" type="textarea" :rows="3"></Input>
</FormItem>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit">保存</Button>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</template>
<script>
export default {
name: 'Edit',
data() {
return {
entity: this.v,
rules: {
name: [{ required: true, message: '必填', trigger: 'blur' }],
code: [{ required: true, message: '必填', trigger: 'blur' }]
}
}
},
props: {
v: Object
},
methods: {
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
var url2 = `${systemUrl}/Dictionary/createorupdate`
this.$api.post(url2, { Dictionary: this.entity }).then((r) => {
if (r.success) {
this.$Message.success('保存成功')
this.$emit('on-ok')
}
})
}
})
},
handleClose() {
this.$emit('on-close')
}
},
watch: {
v(v) {
this.entity = this.v
console.info(this.entity)
}
}
}
</script>
This diff is collapsed.
import Api from '@/plugins/request'
export default {
// index:`${authUrl}/api/services/app/host/paged`,
index:`${systemNew}api/services/app/host/paged`, //new
index:`${systemNew}/api/services/app/host/paged`, //new
paged(params){
// return Api.post(`${authUrl}/api/services/app/host/paged`,params); systemNew
return Api.post(`${systemNew}api/services/app/host/paged`,params);
return Api.post(`${systemNew}/api/services/app/host/paged`,params);
},
get(params){
return Api.get(`${systemNew}api/services/app/host/get`,params);
return Api.get(`${systemNew}/api/services/app/host/get`,params);
},
create(params){
return Api.post(`${systemNew}api/services/app/host/create`,params);
return Api.post(`${systemNew}/api/services/app/host/create`,params);
},
update(params){
return Api.post(`${systemNew}api/services/app/host/update`,params);
return Api.post(`${systemNew}/api/services/app/host/update`,params);
},
//删除:
delete(params) {
return Api.delete(`${systemNew}api/services/app/host/delete`,{params:params});
return Api.delete(`${systemNew}/api/services/app/host/delete`,{params:params});
},
}
\ No newline at end of file
......@@ -11,7 +11,7 @@ let address=systemApi.dev;
window.systemUrl = `http://${address}:10000/system`; //System-api 系统管理(基础数据)
window.system =`http://${address}:10000/auth`;//多租户后台系统
window.systemNew =`http://${address}:10130/`;//多租户后台系统-new 10130/platform/host/paged
window.systemNew =`http://${address}:10130`;//多租户后台系统-new 10130/platform/host/paged
window.authUrl = `http://${address}:10010`; //Authentication-api //统一登陆认证
window.designUrl = `http://${address}:10000/process`; // 工艺规程
window.PlanUrl = `http://${address}:10000/plan`; //订单
......
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