Compare commits
No commits in common. "5d563bec3dd1dcc13c42562d9792fd0d35077fba" and "18e7d30b9cdc865098a206189fd8b8db59ff04dd" have entirely different histories.
5d563bec3d
...
18e7d30b9c
|
@ -2,7 +2,7 @@
|
|||
"name": "collect_information",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"description": "小程序",
|
||||
"description": "智慧派出所信息采集小程序",
|
||||
"templateInfo": {
|
||||
"name": "default",
|
||||
"typescript": true,
|
||||
|
|
|
@ -2,8 +2,7 @@ export default defineAppConfig({
|
|||
pages: [
|
||||
'pages/login/login',
|
||||
'pages/register/register',
|
||||
'pages/projectManager/index/index',
|
||||
'pages/policeManager/index/index',
|
||||
'pages/index/index',
|
||||
'pages/mine/mine',
|
||||
'pages/employeeInfo/employeeInfo',
|
||||
],
|
||||
|
@ -16,7 +15,7 @@ export default defineAppConfig({
|
|||
tabBar: {
|
||||
list: [
|
||||
{
|
||||
pagePath: 'pages/projectManager/index/index',
|
||||
pagePath: 'pages/index/index',
|
||||
text: '首页',
|
||||
iconPath: "assets/mine/punch.png",
|
||||
selectedIconPath: "assets/mine/punch-active.png"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
*{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="swiper-demo">
|
||||
12
|
||||
</view>
|
||||
<view class="margin-top">
|
||||
45
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import './index.scss'
|
||||
import {ref} from 'vue'
|
||||
import Taro from "@tarojs/taro";
|
||||
|
||||
|
||||
const swiperRef = ref()
|
||||
console.log(swiperRef)
|
||||
|
||||
</script>
|
||||
|
||||
|
|
@ -1,87 +0,0 @@
|
|||
.SignMultiple {
|
||||
height: 100vh;
|
||||
background: #f4f5f7;
|
||||
position: relative;
|
||||
|
||||
.urlIndex {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 440rpx;
|
||||
background: #3a6bbe;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
|
||||
.urlTitle {
|
||||
width: 100%;
|
||||
height: 300rpx;
|
||||
|
||||
.urlWelcome {
|
||||
color: #fff;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.urlHibiscus {
|
||||
height: 200rpx;
|
||||
line-height: 58rpx;
|
||||
//font-size: 38rpx;
|
||||
margin: 40rpx 20rpx;
|
||||
border: 2px solid #a1b8e0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.contact {
|
||||
height: 100rpx;
|
||||
width: 100rpx;
|
||||
border-radius: 50%;
|
||||
border: solid 1px gray;
|
||||
|
||||
.image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.type {
|
||||
margin: 0 20rpx 0 20rpx;
|
||||
width: 29%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.HiddenEse {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
right: 0;
|
||||
width: 76rpx;
|
||||
height: 40rpx;
|
||||
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.SignItem {
|
||||
transform: translateY(15%);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin: 20rpx 48rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.Cancel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
margin: 20rpx 40rpx;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,71 +1,16 @@
|
|||
<template>
|
||||
<view class="SignMultiple">
|
||||
<view class="urlIndex">
|
||||
<view class="urlTitle">
|
||||
<view class="urlWelcome">
|
||||
<view style="font-size: 26px">Welcome</view>
|
||||
<view class="urlHibiscus">
|
||||
<view class="contact">
|
||||
<image
|
||||
src='https://img12.360buyimg.com/imagetools/jfs/t1/196430/38/8105/14329/60c806a4Ed506298a/e6de9fb7b8490f38.png'
|
||||
mode="scaleToFill"
|
||||
class="image"
|
||||
/>
|
||||
<text>欢迎</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="SignItem">
|
||||
<view class="Cancel">
|
||||
<nut-button block type="success" @click="onLogin">一键授权</nut-button>
|
||||
</view>
|
||||
</view>
|
||||
登录
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import "./login.scss";
|
||||
import Taro, { useLoad } from "@tarojs/taro";
|
||||
import api from "@/request/index";
|
||||
|
||||
|
||||
useLoad(() => {
|
||||
|
||||
useLoad(() => {});
|
||||
const onLogin = () => {
|
||||
Taro.login({
|
||||
success: (res) => {
|
||||
if(res.code){
|
||||
api.post<LoginUserInfo>("/login", {
|
||||
clientType: 'MINI_PROGRAM',
|
||||
loginParams: {
|
||||
code:res.code
|
||||
}
|
||||
}).then(async (resp)=>{
|
||||
await Taro.setStorage({
|
||||
key: "token",
|
||||
data: resp.data,
|
||||
success(res) {
|
||||
Taro.switchTab({
|
||||
url: '/pages/projectManager/index/index'
|
||||
})
|
||||
},
|
||||
})
|
||||
}).catch((error)=>{
|
||||
if(error.code === 402){
|
||||
Taro.navigateTo({
|
||||
url: "/pages/register/register",
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
<template>
|
||||
<view>警察</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
|
@ -1,41 +0,0 @@
|
|||
<template>
|
||||
<view>
|
||||
<view class="swiper-demo">
|
||||
<nut-swiper ref="swiperRef" pagination-visible pagination-color="#e53e31" :auto-play="3000" :init-page="0">
|
||||
<nut-swiper-item v-for="(item, index) in list" :key="index" style="height: 150px">
|
||||
<img :src="item" alt="" style="height: 100%; width: 100%" draggable="false"/>
|
||||
</nut-swiper-item>
|
||||
</nut-swiper>
|
||||
</view>
|
||||
<view class="margin-top">
|
||||
<nut-grid :column-num="3">
|
||||
<nut-grid-item
|
||||
text="我的项目"
|
||||
@click="Taro.navigateTo({url: '/pages/index/dataEntry/buildFloorEntry/buildFloorEntry'})">
|
||||
</nut-grid-item>
|
||||
<nut-grid-item
|
||||
text="警保风采"
|
||||
@click="Taro.navigateTo({url: '/pages/index/dataEntry/personnelInformationEntry/personnelInformationEntry'})">
|
||||
</nut-grid-item>
|
||||
<nut-grid-item text=".....">
|
||||
</nut-grid-item>
|
||||
</nut-grid>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import './index.scss'
|
||||
import {ref} from 'vue'
|
||||
import Taro from "@tarojs/taro";
|
||||
|
||||
const list = ref([
|
||||
'https://storage.360buyimg.com/jdc-article/NutUItaro34.jpg',
|
||||
'https://storage.360buyimg.com/jdc-article/NutUItaro2.jpg',
|
||||
'https://storage.360buyimg.com/jdc-article/welcomenutui.jpg',
|
||||
'https://storage.360buyimg.com/jdc-article/fristfabu.jpg'
|
||||
])
|
||||
const swiperRef = ref()
|
||||
|
||||
</script>
|
||||
|
||||
|
|
@ -24,6 +24,18 @@
|
|||
</nut-radio>
|
||||
</nut-radio-group>
|
||||
</nut-form-item>
|
||||
<nut-form-item label="手机号:">
|
||||
<nut-input
|
||||
v-model="formData.telephone"
|
||||
placeholder="请输入手机号码"
|
||||
type="text"
|
||||
/>
|
||||
</nut-form-item>
|
||||
<nut-form-item label="行政区划:" prop="name">
|
||||
<view @click="visible = true" style="color: black">
|
||||
{{ streetCommunitySmallCommunityLabel || "请选择行政区划" }}
|
||||
</view>
|
||||
</nut-form-item>
|
||||
<nut-form-item label="身份:">
|
||||
<nut-radio-group v-model="formData.identity">
|
||||
<nut-radio
|
||||
|
@ -34,20 +46,8 @@
|
|||
</nut-radio>
|
||||
</nut-radio-group>
|
||||
</nut-form-item>
|
||||
<nut-form-item label="手机号:">
|
||||
<nut-input
|
||||
v-model="formData.telephone"
|
||||
placeholder="请输入手机号码"
|
||||
type="text"
|
||||
/>
|
||||
</nut-form-item>
|
||||
<nut-form-item label="行政区划:" prop="name">
|
||||
<view @click="visible = true" style="color: #808080">
|
||||
{{ streetCommunitySmallCommunityLabel || "请选择行政区划" }}
|
||||
</view>
|
||||
</nut-form-item>
|
||||
<nut-form-item label="单位:" name="unitId">
|
||||
<view @click="unitsList" style="color: #808080">
|
||||
<view @click="unitsList" style="color: black">
|
||||
{{ selectedLabel || '请选择单位'}}
|
||||
</view>
|
||||
</nut-form-item>
|
||||
|
@ -65,7 +65,7 @@
|
|||
:field-names="{
|
||||
text: 'label',
|
||||
children: 'extData'
|
||||
}" v-model="formData.unitId" :columns="columns" title="请选择单位" @confirm="confirm" @cancel="show = false"/>
|
||||
}" v-model="formData.unitId" :columns="columns" title="请选择城市" @confirm="confirm" @cancel="show = false"/>
|
||||
</nut-popup>
|
||||
<view class="registerBtn">
|
||||
<nut-button block type="success" @click="register">注册</nut-button>
|
||||
|
@ -75,7 +75,7 @@
|
|||
</template>
|
||||
<script setup lang="ts">
|
||||
import './register.scss'
|
||||
import {onMounted, ref, watch} from "vue";
|
||||
import {onMounted, ref} from "vue";
|
||||
import {IDENTITY, SEX} from "@/enums";
|
||||
import Taro from "@tarojs/taro";
|
||||
import api from '@/request/index'
|
||||
|
@ -121,22 +121,16 @@ const unitsList = async () => {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
const selectedLabel = ref ('')
|
||||
const confirm = ({selectedOptions, selectedValue}) => {
|
||||
Object.keys(selectedOptions).forEach((e)=>{
|
||||
selectedLabel.value = selectedOptions[e].label
|
||||
formData.value.unitId = selectedOptions[e].value
|
||||
})
|
||||
console.log(formData.value.unitId,selectedLabel.value)
|
||||
show.value = false
|
||||
}
|
||||
|
||||
// 身份
|
||||
watch(()=>formData.value.identity,(value)=>{
|
||||
formData.value.unitId = ''
|
||||
selectedLabel.value = ''
|
||||
})
|
||||
|
||||
const formRef = ref<FormInstance>()
|
||||
// 注册之前先调用login拿取code 传递给后端
|
||||
// 注册
|
||||
|
@ -163,8 +157,8 @@ const register = async () => {
|
|||
key: "token",
|
||||
data: resp.data,
|
||||
success(res) {
|
||||
Taro.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
Taro.switchTab({
|
||||
url: '/pages/index/index'
|
||||
})
|
||||
},
|
||||
})
|
||||
|
@ -211,8 +205,8 @@ const getNickname = (e) => {
|
|||
console.log( formData.value.name)
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await getAdministrativeDivisionTree()
|
||||
onMounted(() => {
|
||||
getAdministrativeDivisionTree()
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
@ -2,4 +2,3 @@ interface LoginUserInfo {
|
|||
name?: string;
|
||||
avatar?: string;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
:src="minioBaseUrl+modelValue"
|
||||
alt="avatar"/>
|
||||
<a-button class="btn-success" @click="selectFile">{{ btnLabel }}</a-button>
|
||||
<input id="myFileInput" type="file" style="display: none" ref="fileInput" />
|
||||
<input id="myFileInput" type="file" style="display: none"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -40,8 +40,6 @@ const props = withDefaults(defineProps<{
|
|||
const uploading = ref(false)
|
||||
const percent = ref(0)
|
||||
let cancelToken: CancelTokenSource | null = null
|
||||
const uploadUrl = ref()
|
||||
const fileInput = ref(null);
|
||||
|
||||
const selectFile = () => {
|
||||
document.getElementById('myFileInput')?.click()
|
||||
|
@ -64,23 +62,19 @@ async function inputFileListener(this: HTMLInputElement) {
|
|||
uploading.value = true;
|
||||
|
||||
const objectName = generateSimpleObjectName(selectedFile.name, props.parentDir)
|
||||
uploadUrl.value = await getResignedObjectUrl(__APP_ENV.VITE_APP_MINIO_BUCKET, objectName)
|
||||
const uploadUrl = await getResignedObjectUrl(__APP_ENV.VITE_APP_MINIO_BUCKET, objectName);
|
||||
cancelToken = axios.CancelToken.source()
|
||||
await axios.put(uploadUrl.value, selectedFile, {
|
||||
await axios.put(uploadUrl, selectedFile, {
|
||||
cancelToken: cancelToken.token,
|
||||
onUploadProgress: (progressEvent) => {
|
||||
percent.value = (progressEvent.loaded / (progressEvent.total as number) * 100 | 0)
|
||||
}
|
||||
})
|
||||
|
||||
modelValue.value = '/' + __APP_ENV.VITE_APP_MINIO_BUCKET + objectName;
|
||||
uploading.value = false;
|
||||
}
|
||||
|
||||
const fileDelete = ()=>{
|
||||
uploadUrl.value = ''
|
||||
fileInput.value.value = ''
|
||||
modelValue.value = ''
|
||||
}
|
||||
onMounted(() => {
|
||||
document.getElementById('myFileInput')?.addEventListener('change', inputFileListener);
|
||||
})
|
||||
|
@ -88,7 +82,6 @@ onMounted(() => {
|
|||
onUnmounted(() => {
|
||||
document.getElementById('myFileInput')?.removeEventListener('change', inputFileListener);
|
||||
})
|
||||
defineExpose({fileDelete})
|
||||
|
||||
</script>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ export interface formDatePort {
|
|||
businessLicense:string,
|
||||
legalPersonInfo:string,
|
||||
telephone:string,
|
||||
administrativeDivisionCodes:string,
|
||||
administrativeDivisionCodes:Record<string, any>,
|
||||
address:string,
|
||||
nature:string
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ const formDate = ref<formDatePort>({
|
|||
businessLicense:'',
|
||||
legalPersonInfo:'',
|
||||
telephone:'',
|
||||
administrativeDivisionCodes:'',
|
||||
administrativeDivisionCodes:undefined,
|
||||
address:'',
|
||||
nature:''
|
||||
})
|
||||
|
@ -126,12 +126,13 @@ const DivisionTree = async ()=>{
|
|||
|
||||
// 可以进行搜索行政区划 2
|
||||
const filter: ShowSearchType['filter'] = (inputValue, path) => {
|
||||
console.log(inputValue,path)
|
||||
return path.some(option => option.label.toLowerCase().indexOf(inputValue.toLowerCase()) > -1);
|
||||
};
|
||||
|
||||
// 搜索完成时回调
|
||||
const searchAdministrativeDivisionTree = (e:Array<string>)=>{
|
||||
formDate.value.administrativeDivisionCodes = e as any
|
||||
formDate.value.administrativeDivisionCodes = e
|
||||
}
|
||||
// 注册企业入驻
|
||||
const onFinish = async ()=>{
|
||||
|
@ -152,7 +153,6 @@ const onFinish = async ()=>{
|
|||
}
|
||||
const resp = await api.post('/common/securityUnitRegister',securityUnitRegisterParams)
|
||||
message.success(resp.message)
|
||||
fileUpload.value.fileDelete()
|
||||
await formDateRef.value.resetFields() //成功之后进行移除表单
|
||||
formDate.value = {
|
||||
name:'',
|
||||
|
@ -160,7 +160,7 @@ const onFinish = async ()=>{
|
|||
businessLicense:'',
|
||||
legalPersonInfo:'',
|
||||
telephone:'',
|
||||
administrativeDivisionCodes:'',
|
||||
administrativeDivisionCodes:undefined,
|
||||
address:'',
|
||||
nature:''
|
||||
}
|
||||
|
|
|
@ -98,8 +98,8 @@ const formParams = ref<{
|
|||
|
||||
const columns: TableProps['columns'] = [
|
||||
{
|
||||
dataIndex: 'name',
|
||||
title: '服务项目名称',
|
||||
dataIndex: 'enterprisesUnitName',
|
||||
title: '企事业单位名称',
|
||||
width: 150,
|
||||
ellipsis: true
|
||||
},
|
||||
|
@ -108,10 +108,9 @@ const columns: TableProps['columns'] = [
|
|||
title: '项目经理小程序用户名称',
|
||||
width: 200,
|
||||
ellipsis: true
|
||||
},
|
||||
{
|
||||
dataIndex: 'enterprisesUnitName',
|
||||
title: '企事业单位名称',
|
||||
}, {
|
||||
dataIndex: 'name',
|
||||
title: '服务项目名称',
|
||||
width: 150,
|
||||
ellipsis: true
|
||||
},
|
||||
|
@ -130,7 +129,7 @@ const columns: TableProps['columns'] = [
|
|||
{
|
||||
dataIndex:'idNumber',
|
||||
title: '证件号',
|
||||
width:170
|
||||
width:200
|
||||
},
|
||||
{
|
||||
dataIndex:'serviceArea',
|
||||
|
@ -427,8 +426,8 @@ const addServiceProjects = () => {
|
|||
}
|
||||
|
||||
onMounted(async ()=>{
|
||||
await projectManagerMiniProgram()
|
||||
await getAdministrativeDivisionTree()
|
||||
await projectManagerMiniProgram()
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
@ -98,7 +98,6 @@ const columns: TableProps['columns'] = [
|
|||
}
|
||||
return <a-space >
|
||||
<a-button
|
||||
type="primary"
|
||||
className={record.isEnable.value === 0 ? 'btn-danger' : 'btn-success'}
|
||||
onClick={async () => {
|
||||
const resp = await api.post('/management/disableOrEnableMiniProgramUser', {
|
||||
|
|
Loading…
Reference in New Issue