修改bug

This commit is contained in:
wangyilin 2024-09-14 15:55:16 +08:00
parent e5fa6ae335
commit e9f6f61b21
4 changed files with 53 additions and 42 deletions

View File

@ -10,25 +10,25 @@ const pinia = createPinia()
// pinia.use(piniaPluginPersistedstate)
const App = createApp({
onShow(options) {
try {
const store = useCounterStore()
const token = Taro.getStorageSync('token')
console.log(token)
if (token) {
Taro.switchTab({
url: '/pages/mine/mine'
// url: '/pages/projectManager/index/index'
})
store.setSelected(2)
} else {
console.log(2222)
}
console.log('App onShow.')
} catch (err) {
console.log(err)
}
// try {
// const store = useCounterStore()
// const token = Taro.getStorageSync('token')
// console.log(token)
// if (token) {
// Taro.switchTab({
// url: '/pages/mine/mine'
// // url: '/pages/projectManager/index/index'
//
// })
// store.setSelected(2)
// } else {
// console.log(2222)
// }
// console.log('App onShow.')
// } catch (err) {
// console.log(err)
//
// }
},
// 入口组件不需要实现 render 方法,即使实现了也会被 taro 所覆盖

View File

@ -1,6 +1,5 @@
<template>
<view class="form">
{{ formData }}
<nut-form ref="formRef" :model-value="formData" :rules="rules">
<nut-form-item label="姓名" prop="name">
<nut-input v-model="formData.name" placeholder="请输入姓名" type="text"/>

View File

@ -1,5 +1,6 @@
<template>
<view class="myProject">
<view v-if="myProjectList">
<view class="myProjectItem" v-for="(item,index) in myProjectList" :key="index">
<view style="display: flex;justify-content: space-between">
<text>{{ item?.name }}</text>
@ -19,6 +20,13 @@
</view>
</view>
</view>
<view v-else class="myProject" >
<nut-empty image="empty" description="暂无项目">
<div style="margin-top: 10px">
</div>
</nut-empty>
</view>
</view>
</template>
<script setup lang="ts">
@ -31,6 +39,7 @@ const myProjectList = ref<MyProjectList[]>()
const getMyServiceProject = async () => {
const resp = await api.get<MyProjectList[]>(`/projectManageIndex/getMyServiceProject`)
myProjectList.value = resp.data
console.log(myProjectList.value.length)
}
const projectClick = (items: ServiceProjectList, name: string) => {

View File

@ -113,7 +113,8 @@ const columns: TableProps['columns'] = [
dataIndex: 'enterprisesUnitName',
title: '企事业单位名称',
width: 150,
ellipsis: true
ellipsis: true,
},
{
dataIndex:'type',
@ -192,7 +193,7 @@ const columns: TableProps['columns'] = [
<a-button type="primary" danger>删除</a-button>
</a-popconfirm>
<a-button type="primary" onClick={ async ()=>{
console.log(record)
// console.log(record)
visible.value = true
serviceTitle.value = '编辑服务项目'
if(record.isRecruitSecurity === null ){
@ -207,7 +208,7 @@ const columns: TableProps['columns'] = [
idNumberDisabled.value = true
}
}
formParams.value.projectManagerMiniProgramUserId = record.projectManagerMiniProgramUserName
formParams.value.projectManagerMiniProgramUserId = record.projectManagerMiniProgramUserId
formParams.value.snowFlakeId = record.snowFlakeId
formParams.value.name = record.name
formParams.value.type = record.type.value
@ -218,9 +219,7 @@ const columns: TableProps['columns'] = [
formParams.value.houseTotal = record.houseTotal
formParams.value.staffTotal = record.staffTotal
formParams.value. securityUserTotal = record.securityUserTotal
formParams.value.enterprisesUnitId = record.enterprisesUnitName
enterprisesUnitId.value = record.enterprisesUnitId
formParams.value.administrativeDivisionCodes = record.enterprisesUnitAdministrativeDivisionCodes
}}>编辑</a-button>
</a-space>
@ -278,7 +277,11 @@ const formItemOptions = ref<FormProMaxItemOptions<serviceProjectSaveOrUpdatePara
label:'企事业单位',
options:enterprisesUnitIdList,
componentsProps:{
allowClear:true
allowClear:true,
onChange:async (value:string)=>{
console.log(value)
enterprisesUnitId.value = value
}
}
},
type: {
@ -368,10 +371,10 @@ const formItemOptions = ref<FormProMaxItemOptions<serviceProjectSaveOrUpdatePara
label: '备注',
}
})
const UnitId = ref('')
const submit = async()=>{
await formRef.value.validate()
const snowFlakeId = ref('')
const UnitId = ref('')
if (serviceTitle.value === '新增服务项目') {
snowFlakeId.value = ''
UnitId.value = formParams.value.enterprisesUnitId