diff --git a/api/app/lib/controllers/organization/department.js b/api/app/lib/controllers/organization/department.js index 7b72e096..77821045 100644 --- a/api/app/lib/controllers/organization/department.js +++ b/api/app/lib/controllers/organization/department.js @@ -52,7 +52,7 @@ async function getdep(ctx) { async function editDep(ctx) { try { const models = ctx.fs.dc.models; - const { depId, name, dependence, areaCode, area } = ctx.request.body + const { depId, name, dependence, areaCode } = ctx.request.body //console.log(ctx.request.body, '111111wed') if (dependence) { let dep = await models.Department.findOne({ @@ -101,7 +101,7 @@ async function editDep(ctx) { name: name, delete: false, dependence: dependence || null, - areaCode: area || null + areaCode: areaCode || null }) } ctx.status = 204; diff --git a/scripts/1.2.2/schema/4.insert_resource.sql b/scripts/1.2.2/schema/4.insert_resource.sql index fc8f99ef..e07ccc79 100644 --- a/scripts/1.2.2/schema/4.insert_resource.sql +++ b/scripts/1.2.2/schema/4.insert_resource.sql @@ -1,15 +1,19 @@ -INSERT INTO resource (code, name, parent_resource) VALUES ('ALLSELECT', '全选', null); -INSERT INTO resource (code, name, parent_resource) VALUES ('USERMANAGE', '用户管理', 'ALLSELECT'); -INSERT INTO resource (code, name, parent_resource) VALUES ('AUTHORIMANAGE', '权限管理', 'ALLSELECT'); -INSERT INTO resource (code, name, parent_resource) VALUES ('OVERLOADMANAGE', '治超管理', 'ALLSELECT'); -INSERT INTO resource (code, name, parent_resource) VALUES ('ROADMANAGE', '道路管理', 'ALLSELECT'); -INSERT INTO resource (code, name, parent_resource) VALUES ('BRIDGEMANAGE', '桥梁管理', 'ALLSELECT'); -INSERT INTO resource (code, name, parent_resource) VALUES ('MAINTENANCEMANAGE', '管养管理', 'ALLSELECT'); -INSERT INTO resource (code, name, parent_resource) VALUES ('TRANSPORTATIONMANAGE', '运政管理', 'ALLSELECT'); -INSERT INTO resource (code, name, parent_resource) VALUES ('CONSERVATIONMANAGE', '养护管理', 'ALLSELECT'); -INSERT INTO resource (code, name, parent_resource) VALUES ('PATROLMANAGE', '巡查管理', 'ALLSELECT'); -INSERT INTO resource (code, name, parent_resource) VALUES ('PUBLICTRANSPORTMANAGE', '公交管理', 'ALLSELECT'); -INSERT INTO resource (code, name, parent_resource) VALUES ('FILEMANAGE', '档案管理', 'ALLSELECT'); -INSERT INTO resource (code, name, parent_resource) VALUES ('PUBLICITYVIDEO', '宣传视频', 'ALLSELECT'); -INSERT INTO resource (code, name, parent_resource) VALUES ('FEEDBACKMANAGE', '异常反馈', 'ALLSELECT'); -INSERT INTO resource (code, name, parent_resource) VALUES ('REPORTMANAGE', '建设上报', 'ALLSELECT'); \ No newline at end of file +INSERT INTO public.resource (code, name, parent_resource) VALUES ('ALLSELECT', '全选', null); +INSERT INTO public.resource (code, name, parent_resource) VALUES ('USERMANAGE', '用户管理', 'ALLSELECT'); +INSERT INTO public.resource (code, name, parent_resource) VALUES ('AUTHORIMANAGE', '权限管理', 'ALLSELECT'); +INSERT INTO public.resource (code, name, parent_resource) VALUES ('OVERLOADMANAGE', '治超管理', 'ALLSELECT'); +INSERT INTO public.resource (code, name, parent_resource) VALUES ('ROADMANAGE', '道路管理', 'ALLSELECT'); +INSERT INTO public.resource (code, name, parent_resource) VALUES ('BRIDGEMANAGE', '桥梁管理', 'ALLSELECT'); +INSERT INTO public.resource (code, name, parent_resource) VALUES ('MAINTENANCEMANAGE', '管养管理', 'ALLSELECT'); +INSERT INTO public.resource (code, name, parent_resource) VALUES ('TRANSPORTATIONMANAGE', '运政管理', 'ALLSELECT'); +INSERT INTO public.resource (code, name, parent_resource) VALUES ('CONSERVATIONMANAGE', '养护管理', 'ALLSELECT'); +INSERT INTO public.resource (code, name, parent_resource) VALUES ('PATROLMANAGE', '巡查管理', 'ALLSELECT'); +INSERT INTO public.resource (code, name, parent_resource) VALUES ('PUBLICTRANSPORTMANAGE', '公交管理', 'ALLSELECT'); +INSERT INTO public.resource (code, name, parent_resource) VALUES ('FILEMANAGE', '档案管理', 'ALLSELECT'); +INSERT INTO public.resource (code, name, parent_resource) VALUES ('PUBLICITYVIDEO', '宣传视频', 'ALLSELECT'); +INSERT INTO public.resource (code, name, parent_resource) VALUES ('FEEDBACKMANAGE', '异常反馈', 'ALLSELECT'); +INSERT INTO public.resource (code, name, parent_resource) VALUES ('REPORTMANAGE', '建设上报', 'ALLSELECT'); +INSERT INTO public.resource (code, name, parent_resource) VALUES ('WXPATROLREPORT', '小程序巡查上报', 'ALLSELECT'); +INSERT INTO public.resource (code, name, parent_resource) VALUES ('WXMAINTENANCEREPORT', '小程序养护上报', 'ALLSELECT'); +INSERT INTO public.resource (code, name, parent_resource) VALUES ('WXFEEDBACKMANAGE', '小程序异常反馈', 'ALLSELECT'); +INSERT INTO public.resource (code, name, parent_resource) VALUES ('WXBUILDINGROAD', '小程序在建道路', 'ALLSELECT'); diff --git a/web/client/src/sections/organization/components/depModal.js b/web/client/src/sections/organization/components/depModal.js index b54e74af..7bf7997d 100644 --- a/web/client/src/sections/organization/components/depModal.js +++ b/web/client/src/sections/organization/components/depModal.js @@ -4,7 +4,8 @@ import { Spin, Card, Modal, TreeSelect } from 'antd'; import ProForm, { ProFormText, ModalForm, ProFormSwitch, ProFormTreeSelect } from '@ant-design/pro-form'; const DepModal = (props) => { - const { visible, onVisibleChange, onConfirm, depModalType, depData, data } = props; + const { visible, onVisibleChange, onConfirm, depModalType, depData, data } = props + console.log('data', data) const formRef = useRef(); const roadCode = [ { title: "莲塘镇", value: "360121100000" }, @@ -16,22 +17,22 @@ const DepModal = (props) => { { title: "武阳镇", value: "360121106000" }, { title: "冈上镇", value: "360121107000" }, { title: "广福镇", value: "360121108000" }, - { title: "昌东镇", value: "360121191000" }, - { title: "麻丘镇", value: "360121192000" }, + //{ title: "昌东镇", value: "360121191000" }, + //{ title: "麻丘镇", value: "360121192000" }, { title: "泾口乡", value: "360121200000" }, { title: "南新乡", value: "360121201000" }, { title: "塔城乡", value: "360121202000" }, { title: "黄马乡", value: "360121203000" }, { title: "富山乡", value: "360121204000" }, - { title: "东新乡", value: "360121205000" }, + //{ title: "东新乡", value: "360121205000" }, { title: "八一乡", value: "360121206000" }, - { title: "小蓝经济开发区", value: "360121403000" }, - { title: "银三角管理委员会", value: "360121501000" }, - { title: "五星垦殖场", value: "360121501000" }, - { title: "良种繁殖场", value: "360121572000" }, + //{ title: "小蓝经济开发区", value: "360121403000" }, + { title: "银三角管理委员会", value: "360121471000" }, + // { title: "五星垦殖场", value: "360121501000" }, + // { title: "良种繁殖场", value: "360121572000" }, ] useEffect(() => { - console.log('depData', depData) + //console.log('depData', depData) }, []) const onFinish = (values) => { @@ -41,7 +42,7 @@ const DepModal = (props) => { name: values.name, depId: data.id, dependence: values.dependence, - areaCode: values.area + areaCode: values.areaCode } onConfirm(value) } else { @@ -92,7 +93,7 @@ const DepModal = (props) => { }} />