Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/H5/threeSide
| | |
| | | <script> |
| | | export default { |
| | | onLaunch: function() { |
| | | console.log('App Launch') |
| | | |
| | | }, |
| | | onShow: function() { |
| | | console.log('App Show') |
| | | |
| | | }, |
| | | onHide: function() { |
| | | console.log('App Hide') |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | longPressActions: { |
| | | itemList: ['发送给朋友', '保存图片', '收藏'], |
| | | success: function(data) { |
| | | console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片'); |
| | | |
| | | }, |
| | | fail: function(err) { |
| | | console.log(err.errMsg); |
| | | |
| | | } |
| | | } |
| | | }); |
| | |
| | | }, |
| | | getproblem() { |
| | | getproblem().then((resp => { |
| | | console.log(resp, '问题类型') |
| | | |
| | | this.columns = [resp.data.map(item => { |
| | | return item.name |
| | | })] |
| | |
| | | videos: this.videos.join(','), |
| | | } |
| | | save(data).then(resp => { |
| | | console.log(resp, '保存'); |
| | | |
| | | if (resp.code == 200) { |
| | | uni.showToast({ |
| | | title: '保存成功', |
| | |
| | | }) |
| | | }, |
| | | 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 |
| | | }, |
| | |
| | | this.showList = false |
| | | }, |
| | | goTopagelocation() { |
| | | console.log('0000000000000000'); |
| | | |
| | | uni.navigateTo({ |
| | | url: '/pages/location/location' |
| | | }) |
| | |
| | | sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 |
| | | sourceType: ['album'], //从相册选择 |
| | | success: (res) => { |
| | | console.log(res, 'res'); |
| | | |
| | | uni.showLoading() |
| | | uni.uploadFile({ |
| | | url: config.imageUrl, |
| | |
| | | 'Authorization': uni.getStorageSync('token') |
| | | }, |
| | | success: (uploadFileRes) => { |
| | | console.log(JSON.parse(uploadFileRes.data), 'uploadFileRes'); |
| | | |
| | | this.images = [...this.images, JSON.parse(uploadFileRes.data).data] |
| | | uni.hideLoading() |
| | | }, |
| | |
| | | '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() |
| | | }, |
| | |
| | | methods: { |
| | | open() { |
| | | getInfo().then(resp => { |
| | | console.log(resp, '党员信息'); |
| | | |
| | | if(resp.code==200){ |
| | | this.info =resp.data |
| | | } |
| | |
| | | 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) |
| | |
| | | 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 |
| | |
| | | 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) { |
| | |
| | | |
| | | }, |
| | | change() { |
| | | console.log('1111'); |
| | | |
| | | }, |
| | | |
| | | onClick() { |
| | | this.isClick = true |
| | | console.log('this.isClick', this.isClick); |
| | | |
| | | }, |
| | | goTopage() { |
| | | uni.navigateTo({ |
| | |
| | | result.id = index + 1 |
| | | return result |
| | | }); |
| | | console.log(this.locationList); |
| | | |
| | | } |
| | | }) |
| | | return |
| | |
| | | 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 |
| | |
| | | }, |
| | | onReady() { |
| | | this.map = new BMapGL.Map("container"); // 创建地图实例 |
| | | console.log(this.map); |
| | | |
| | | // uni.getLocation({ |
| | | // type: 'wgs84', |
| | | // success: (res) => { |
| | |
| | | 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("用户拒绝了位置请求。"); |
| | |
| | | item.id = index + 1 |
| | | return item |
| | | }) |
| | | console.log(this.locationList); |
| | | |
| | | }) |
| | | this.map.addEventListener('click', (e) => { |
| | | this.clearMarkers() |
| | |
| | | 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 |
| | |
| | | }); |
| | | // }, |
| | | // error:err=>{ |
| | | // console.log(err,'err'); |
| | | // |
| | | // } |
| | | // }); |
| | | |
| | |
| | | return dayjs(val).format('YYYY-MM-DD HH:mm:ss') |
| | | } |
| | | }, |
| | | onLoad(params) { |
| | | onShow(params) { |
| | | this.id = params.id |
| | | if (params.type) { |
| | | this.type = false |
| | |
| | | getComplaintDetail({ |
| | | id: params.id |
| | | }).then(res => { |
| | | console.log('res', res) |
| | | |
| | | this.info = { |
| | | ...res.data |
| | | } |
| | |
| | | item.height = uni.$u.addUnit(rowHeight) |
| | | rows.push(item) |
| | | } |
| | | // console.log(rows); |
| | | // |
| | | return rows |
| | | }, |
| | | uTitleWidth() { |
| | |
| | | // width: `${this.startX + this.deltaX}px` |
| | | // } |
| | | // }) |
| | | // // console.log(this.startX + this.deltaX); |
| | | // // |
| | | // animation.transition(button, { |
| | | // styles: { |
| | | // transform: `translateX(${this.startX + this.deltaX}px)` |
| | |
| | | this.barStyle = { |
| | | width: `${width}px` |
| | | } |
| | | // console.log('width', width); |
| | | // |
| | | if (drag) { |
| | | this.$emit('drag', { |
| | | value |
| | |
| | | |
| | | // 开发环境才提示,生产环境不会提示 |
| | | 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 { |
| | |
| | | * @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 |
| | | // 年份限定、上限 |
| | |
| | | * @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 |
| | |
| | | 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({ |
| | |
| | | name: '人员管理', |
| | | path: '/setting/user', |
| | | component: './setting/user', |
| | | // access: '/system_setting/user_management', |
| | | // access: '/system_setting/people_management', |
| | | } |
| | | ], |
| | | }, |
| | |
| | | ); |
| | | }, |
| | | ...initialState?.settings, |
| | | pageTitleRender: () => '“三个身边”群众工作机制问题化解平台' |
| | | }; |
| | | }; |
| | | |
| | |
| | | :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; |
| | | } |
| | | } |
| | | } |
| | |
| | | const okHandle = () => { |
| | | form.validateFields().then((values) => { |
| | | setSpinning(true) |
| | | values.menuIds = treeSeletKeys |
| | | values.systemMenuIds = treeSeletKeys |
| | | delete values.tree |
| | | if (data.id) { |
| | | values.id = data.id |
| | |
| | | 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(); |
| | |
| | | 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 ( |
| | |
| | | ); |
| | | }); |
| | | }; |
| | | 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) => { |
| | |
| | | }, |
| | | { |
| | | 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: '账号层级', |
| | |
| | | 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); |
| | |
| | | </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); |
| | |
| | | </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); |
| | |
| | | </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> |
| | |
| | | <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> |
| | |
| | | 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" |
| | |
| | | |
| | | // 删除 |
| | | export const del = async (id) => { |
| | | return request(`/api/huacheng-sangeshenbian/systemRole/delete/${id}`, { |
| | | return request(`/api/huacheng-sangeshenbian/systemUser/delete/${id}`, { |
| | | method: 'DELETE', |
| | | }); |
| | | } |
| | |
| | | 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', |
| | | }); |
| | | } |