董国庆
2025-02-27 273f8bff26ad7f14473fe00987d7893cb427bd09
Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/H5/threeSide
17个文件已修改
201 ■■■■ 已修改文件
H5/App.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/pages/Appeal/Appeal.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/pages/components/certificate/certificate.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/pages/index/index.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/pages/location/location.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/pages/progress/progress.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/uni_modules/uview-ui/components/u-skeleton/u-skeleton.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/uni_modules/uview-ui/components/u-slider/nvue.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/uni_modules/uview-ui/libs/config/config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/uni_modules/uview-ui/libs/util/calendar.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/utils/request.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
management/config/routes.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
management/src/app.tsx 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
management/src/global.less 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
management/src/pages/setting/role/components/addAndEdit.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
management/src/pages/setting/user/index.jsx 79 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
management/src/pages/setting/user/service.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
H5/App.vue
@@ -1,13 +1,13 @@
<script>
    export default {
        onLaunch: function() {
            console.log('App Launch')
        },
        onShow: function() {
            console.log('App Show')
        },
        onHide: function() {
            console.log('App Hide')
        }
    }
</script>
H5/pages/Appeal/Appeal.vue
@@ -159,10 +159,10 @@
                    longPressActions: {
                        itemList: ['发送给朋友', '保存图片', '收藏'],
                        success: function(data) {
                            console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
                        },
                        fail: function(err) {
                            console.log(err.errMsg);
                        }
                    }
                });
@@ -181,7 +181,7 @@
            },
            getproblem() {
                getproblem().then((resp => {
                    console.log(resp, '问题类型')
                    this.columns = [resp.data.map(item => {
                        return item.name
                    })]
@@ -260,7 +260,7 @@
                    videos: this.videos.join(','),
                }
                save(data).then(resp => {
                    console.log(resp, '保存');
                    if (resp.code == 200) {
                        uni.showToast({
                            title: '保存成功',
@@ -273,12 +273,12 @@
                })
            },
            confirmone(e) {
                console.log(e, 'eeee');
                this.time = dayjs(e.value).format('YYYY-MM-DD')
                this.showDate = false
            },
            confirmtwo(e) {
                console.log(e, 'eeee');
                this.problemType = e.value[0]
                this.showList = false
            },
@@ -291,7 +291,7 @@
                this.showList = false
            },
            goTopagelocation() {
                console.log('0000000000000000');
                uni.navigateTo({
                    url: '/pages/location/location'
                })
@@ -302,7 +302,7 @@
                    sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
                    sourceType: ['album'], //从相册选择
                    success: (res) => {
                        console.log(res, 'res');
                        uni.showLoading()
                        uni.uploadFile({
                            url: config.imageUrl,
@@ -312,7 +312,7 @@
                                'Authorization': uni.getStorageSync('token')
                            },
                            success: (uploadFileRes) => {
                                console.log(JSON.parse(uploadFileRes.data), 'uploadFileRes');
                                this.images = [...this.images, JSON.parse(uploadFileRes.data).data]
                                uni.hideLoading()
                            },
@@ -350,7 +350,7 @@
                                'Authorization': uni.getStorageSync('token')
                            },
                            success: (uploadFileRes) => {
                                console.log(JSON.parse(uploadFileRes.data).data, 'uploadFileRes');
                                this.videos = [...this.videos, JSON.parse(uploadFileRes.data).data]
                                uni.hideLoading()
                            },
H5/pages/components/certificate/certificate.vue
@@ -53,7 +53,7 @@
        methods: {
            open() {
                getInfo().then(resp => {
                    console.log(resp, '党员信息');
                    if(resp.code==200){
                        this.info =resp.data
                    }
H5/pages/index/index.vue
@@ -163,19 +163,19 @@
        methods: {
            Allread() {
                getread().then(resp => {
                    console.log(resp, '=====');
                    this.getMessagelist()
                })
            },
            getBanner() {
                getBanner().then(resp => {
                    console.log(resp, '获取banner');
                    this.bannerlist = resp.data
                })
            },
            getappletcinfo() {
                getappletcinfo().then(resp => {
                    console.log(resp, '-----判断角色');
                    this.userInfo = resp.data
                    this.member = resp.data ? 2 : 1
                    uni.setStorageSync('userInfo', resp.data)
@@ -188,7 +188,7 @@
                    pageSize: 5
                }
                getMessagelist(data).then(resp => {
                    console.log(resp, '获取消息列表');
                    if (resp.data.records.length < 5 && this.pageNum == 1) {
                        this.msgListTotal = resp.data.records
                        this.isLoading = true
@@ -232,7 +232,7 @@
                        1)
                    this.noreadlists = this.msgLists.filter(item => item.readStatus === 0)
                    this.noreadlist = this.msgList.filter(item => item.readStatus === 0)
                    console.log(this.msgListTotal, 'this.msgListTotal');
                })
            },
            changeActive(value) {
@@ -251,12 +251,12 @@
            },
            change() {
                console.log('1111');
            },
            onClick() {
                this.isClick = true
                console.log('this.isClick', this.isClick);
            },
            goTopage() {
                uni.navigateTo({
H5/pages/location/location.vue
@@ -96,7 +96,7 @@
                            result.id = index + 1
                            return result
                        });
                        console.log(this.locationList);
                    }
                })
                return
@@ -111,7 +111,7 @@
                        ak: '3mHKIXMArjgIkgADzOlTYp4XssNSNkwr' // 替换为你自己的 AK
                    },
                    success: (res) => {
                        console.log(res, '-------');
                        if (res.data.status === 0) {
                            this.searchResults = res.data.results;
                            this.latitude = res.data.results[0].location.lat
@@ -135,7 +135,7 @@
        },
        onReady() {
            this.map = new BMapGL.Map("container"); // 创建地图实例 
            console.log(this.map);
            // uni.getLocation({
            //     type: 'wgs84',
            //     success: (res) => {
@@ -146,12 +146,12 @@
                const longitude = position.coords.longitude;
                const accuracy = position.coords.accuracy; // 精度,单位米
                console.log(`纬度: ${latitude}, 经度: ${longitude}, 精度: ${accuracy}`);
                //  在这里可以使用获取到的经纬度信息,例如在地图上显示位置等。
            }
            function error(err) {
                console.log(err);
                switch (err.code) {
                    case err.PERMISSION_DENIED:
                        console.error("用户拒绝了位置请求。");
@@ -191,7 +191,7 @@
                    item.id = index + 1
                    return item
                })
                console.log(this.locationList);
            })
            this.map.addEventListener('click', (e) => {
                this.clearMarkers()
@@ -203,7 +203,7 @@
                var myGeo = new BMapGL.Geocoder();
                // 根据坐标得到地址描述    
                myGeo.getLocation(new BMapGL.Point(e.latlng.lng, e.latlng.lat), (result) => {
                    console.log(result, 'result');
                    this.locationList = result.surroundingPois.map((item, index) => {
                        item.id = index + 1
                        return item
@@ -216,7 +216,7 @@
            });
            // },
            // error:err=>{
            //     console.log(err,'err');
            //
            // }
            // });
H5/pages/progress/progress.vue
@@ -103,7 +103,7 @@
                return dayjs(val).format('YYYY-MM-DD HH:mm:ss')
            }
        },
        onLoad(params) {
        onShow(params) {
            this.id = params.id
            if (params.type) {
                this.type = false
@@ -114,7 +114,7 @@
            getComplaintDetail({
                id: params.id
            }).then(res => {
                console.log('res', res)
                this.info = {
                    ...res.data
                }
H5/uni_modules/uview-ui/components/u-skeleton/u-skeleton.vue
@@ -110,7 +110,7 @@
                    item.height = uni.$u.addUnit(rowHeight)
                    rows.push(item)
                }
                // console.log(rows);
                //
                return rows
            },
            uTitleWidth() {
H5/uni_modules/uview-ui/components/u-slider/nvue.js
@@ -105,7 +105,7 @@
            //                  width: `${this.startX + this.deltaX}px`
            //     }
            // })
            // // console.log(this.startX + this.deltaX);
            // //
            // animation.transition(button, {
            //     styles: {
            //         transform: `translateX(${this.startX + this.deltaX}px)`
@@ -141,7 +141,7 @@
            this.barStyle = {
                width: `${width}px`
            }
            // console.log('width', width);
            //
            if (drag) {
                this.$emit('drag', {
                    value
H5/uni_modules/uview-ui/libs/config/config.js
@@ -3,7 +3,7 @@
// 开发环境才提示,生产环境不会提示
if (process.env.NODE_ENV === 'development') {
    console.log(`\n %c uView V${version} %c https://uviewui.com/ \n\n`, 'color: #ffffff; background: #3c9cff; padding:5px 0; border-radius: 5px;');
}
export default {
H5/uni_modules/uview-ui/libs/util/calendar.js
@@ -378,7 +378,7 @@
        * @param m  solar month
        * @param d  solar day
        * @return JSON object
        * @eg:console.log(calendar.solar2lunar(1987,11,01));
        * @eg:
        */
    solar2lunar: function (y, m, d) { // 参数区间1900.1.31~2100.12.31
        // 年份限定、上限
@@ -497,7 +497,7 @@
        * @param d  lunar day
        * @param isLeapMonth  lunar month is leap or not.[如果是农历闰月第四个参数赋值true即可]
        * @return JSON object
        * @eg:console.log(calendar.lunar2solar(1987,9,10));
        * @eg:
        */
    lunar2solar: function (y, m, d, isLeapMonth) { // 参数区间1900.1.31~2100.12.1
        var isLeapMonth = !!isLeapMonth
H5/utils/request.js
@@ -22,7 +22,7 @@
        let token = uni.getStorageSync('token')
        let header = {
            'content-type': type ? 'application/x-www-form-urlencoded;charset=UTF-8' : 'application/json',
            'Authorization': 'Bearer ' + token,
            'Authorization': token,
            'lang': uni.getStorageSync('locale') === 'zh-Hans' ? 'zh_CN' : 'zh-tw',
        }
        const requestTask = uni.request({
management/config/routes.ts
@@ -55,7 +55,7 @@
        name: '人员管理',
        path: '/setting/user',
        component: './setting/user',
        // access: '/system_setting/user_management',
        // access: '/system_setting/people_management',
      }
    ],
  },
management/src/app.tsx
@@ -89,6 +89,7 @@
      );
    },
    ...initialState?.settings,
    pageTitleRender: () => '“三个身边”群众工作机制问题化解平台'
  };
};
management/src/global.less
@@ -63,4 +63,30 @@
:where(.css-dev-only-do-not-override-17md30i).ant-menu-light .ant-menu-submenu-selected>.ant-menu-submenu-title,
:where(.css-dev-only-do-not-override-17md30i).ant-menu-light>.ant-menu .ant-menu-submenu-selected>.ant-menu-submenu-title{
  color: rgba(0, 0, 0, 0.95);
}
.del-confirm {
  .del-icon {
    margin-right: 5px;
    width: 22px;
    height: 22px;
    background-color: rgba(233, 157, 66, 1);
    color: #fff;
    border-radius: 50%;
    align-content: center;
    text-align: center;
  }
  .ant-modal-confirm-btns {
    .ant-btn-default:last-child {
      border-color: red !important;
      color: #fff !important;
      background-color: red !important;
    }
    .ant-btn-default {
      color: #000 !important;
      border-color: #d9d9d9 !important;
    }
  }
}
management/src/pages/setting/role/components/addAndEdit.jsx
@@ -46,7 +46,7 @@
    const okHandle = () => {
        form.validateFields().then((values) => {
            setSpinning(true)
            values.menuIds = treeSeletKeys
            values.systemMenuIds = treeSeletKeys
            delete values.tree
            if (data.id) {
                values.id = data.id
management/src/pages/setting/user/index.jsx
@@ -1,12 +1,24 @@
import { buildProTableDataSource, sendRequest, showDelConfirm } from '@/utils/antdUtils';
import { buildProTableDataSource, sendRequest, showDelConfirm,showConfirm } from '@/utils/antdUtils';
import { DeleteOutlined, EditOutlined, PlusOutlined } from '@ant-design/icons';
import { PageContainer, ProFormText, ProTable, QueryFilter } from '@ant-design/pro-components';
import { Button, Cascader, Col, Menu, Row, Space } from 'antd';
import { Button, Cascader, Col, Menu, Row, Select, Space } from 'antd';
import { useEffect, useRef, useState } from 'react';
import { Access, useAccess } from 'umi';
import AddAndEdit from './components/addAndEdit';
import AddUnit from './components/addUnit';
import { add, addUnit, del, delUnit, edit, editUnit, getList, getUnitList ,editSystemUserInfo,addSystemUserInfo} from './service';
import {
  addSystemUserInfo,
  addUnit,
  del,
  delUnit,
  editSystemUserInfo,
  editUnit,
  getList,
  getUnitList,
  systemRoleList,
  unfreezeApi,
  freezeApi,
} from './service';
const Role = () => {
  const actionRef = useRef();
@@ -14,12 +26,16 @@
  const addViewRef1 = useRef();
  const [modalVisible, handleModalVisibles] = useState(false);
  const [modalVisible1, handleModalVisibles1] = useState(false);
  const [roleList, setRoleList] = useState([]);
  const [unitId, setUnitId] = useState('');
  const access = useAccess();
  const [items, setItems] = useState([]);
  const { SubMenu } = Menu;
  useEffect(() => {
    fetchUnit();
    systemRoleList({ pageNum: 1, pageSize: 10000 }).then((res) => {
      setRoleList(() => res.data.records);
    });
  }, []);
  const node = (item) => {
    return (
@@ -93,8 +109,8 @@
      );
    });
  };
  const fetchUnit = () => {
    getUnitList().then((res) => {
  const fetchUnit = (params) => {
    getUnitList(params).then((res) => {
      if (res.code == 200 && res.data) {
        const traverseItems = (items) => {
          return items.map((item) => {
@@ -163,8 +179,20 @@
    },
    {
      title: '所属角色',
      dataIndex:'systemRoleId',
      dataIndex: 'systemRoleId',
      hideInTable: true,
      renderFormItem: () => {
        return (
          <Select
            key="searchSelect"
            allowClear
            placeholder="请选择"
            options={roleList}
            fieldNames={{ label: 'name', value: 'id' }}
            filterOption={false}
          ></Select>
        );
      },
    },
    {
      title: '账号层级',
@@ -228,9 +256,8 @@
        return (
          <Space>
            {record.roleId != 1 && (
              <Access accessible={access['/system_setting/role_management/edit']}>
              <Access accessible={access['/system_setting/people_management/edit']}>
                <a
                  type="link"
                  onClick={() => {
                    addViewRef.current.refreshData({...record,type:'edit'});
                    handleModalVisibles(true);
@@ -241,9 +268,8 @@
              </Access>
            )}
            {record.roleId != 1 && (
              <Access accessible={access['/system_setting/role_management/del']}>
              <Access accessible={access['/system_setting/people_management/del']}>
                <a
                  type="link"
                  onClick={() => {
                    showDelConfirm(async () => {
                      let status = await sendRequest(del, record.id);
@@ -257,9 +283,8 @@
                </a>
              </Access>
            )}
            <Access accessible={access['/system_setting/role_management/edit'] || false}>
            <Access accessible={access['/system_setting/people_management/detail'] || false}>
              <a
                type="link"
                onClick={() => {
                  addViewRef.current.refreshData({...record,type:'detail'});
                  handleModalVisibles(true);
@@ -270,13 +295,19 @@
            </Access>
            <Access accessible={access['/system_setting/role_management/edit'] || false}>
              <a
                type="link"
                onClick={() => {
                  addViewRef.current.refreshData(record, true);
                  handleModalVisibles(true);
                  showConfirm(`确认${record.status === 1 ? '冻结' : '解冻'}该人员吗?`,async () => {
                    let status = await sendRequest(
                      record.status === 1 ? freezeApi : unfreezeApi,
                      record.id,
                    );
                    if (status) {
                      actionRef.current.reload();
                    }
                  });
                }}
              >
                冻结
                {record.status === 1 ? '冻结' : '解冻'}
              </a>
            </Access>
          </Space>
@@ -289,10 +320,22 @@
    <PageContainer
      header={{
        breadcrumb: {},
        title: '人员管理',
      }}
    >
      <div style={{ background: '#fff' }}>
        <QueryFilter>
        <QueryFilter
          onReset={(values) => {
            fetchUnit(values);
            setUnitId('');
            actionRef.current.reload();
          }}
          onFinish={(values) => {
            fetchUnit(values);
            setUnitId('');
            actionRef.current.reload();
          }}
        >
          <ProFormText name="name" label="单位名称" />
        </QueryFilter>
      </div>
@@ -339,7 +382,7 @@
              return buildProTableDataSource(getList, obj);
            }}
            toolBarRender={(action, selectRows) => [
              <Access accessible={access['/system_setting/role_management/add']}>
              <Access accessible={access['/system_setting/people_management/add']}>
                <Space>
                  <Button
                    type="primary"
management/src/pages/setting/user/service.js
@@ -65,7 +65,7 @@
// 删除 
export const del = async (id) => {
    return request(`/api/huacheng-sangeshenbian/systemRole/delete/${id}`, {
    return request(`/api/huacheng-sangeshenbian/systemUser/delete/${id}`, {
        method: 'DELETE',
    });
}
@@ -121,4 +121,17 @@
    return request(`/api/huacheng-sangeshenbian/systemUser/getAdministrativeDivision/${data.id}/${data.tier}`, {
        method: 'GET',
    });
}
// 冻结
export const freezeApi = async (id) => {
    return request(`/api/huacheng-sangeshenbian/systemUser/freeze/${id}`, {
        method: 'PUT',
    });
}
// 解冻
export const unfreezeApi = async (id) => {
    return request(`/api/huacheng-sangeshenbian/systemUser/unfreeze/${id}`, {
        method: 'PUT',
    });
}