修改bug
This commit is contained in:
parent
e5fa6ae335
commit
e9f6f61b21
|
@ -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 所覆盖
|
||||
|
|
|
@ -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"/>
|
||||
|
|
|
@ -1,23 +1,31 @@
|
|||
<template>
|
||||
<view class="myProject">
|
||||
<view class="myProjectItem" v-for="(item,index) in myProjectList" :key="index">
|
||||
<view style="display: flex;justify-content: space-between">
|
||||
<text>{{ item?.name }}</text>
|
||||
<!--<text>进行中</text>-->
|
||||
</view>
|
||||
<view class="myProjectIndex">地址:
|
||||
<text>{{ item?.provinceName }}{{ item.cityName }}{{ item.districtsName }}{{ item.streetName }}</text>
|
||||
</view>
|
||||
<view style="display: flex;justify-content: space-between">
|
||||
<text>联系人:{{ item?.contactPersonInfo.name }}</text>
|
||||
<text>电话:{{ item?.contactPersonInfo.telephone }}</text>
|
||||
</view>
|
||||
<view class="project">
|
||||
<view @click="projectClick(items,item?.name)" v-for="(items,index) in item.serviceProjectList" :key="index">
|
||||
{{ items.name }}
|
||||
<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>
|
||||
<!--<text>进行中</text>-->
|
||||
</view>
|
||||
<view class="myProjectIndex">地址:
|
||||
<text>{{ item?.provinceName }}{{ item.cityName }}{{ item.districtsName }}{{ item.streetName }}</text>
|
||||
</view>
|
||||
<view style="display: flex;justify-content: space-between">
|
||||
<text>联系人:{{ item?.contactPersonInfo.name }}</text>
|
||||
<text>电话:{{ item?.contactPersonInfo.telephone }}</text>
|
||||
</view>
|
||||
<view class="project">
|
||||
<view @click="projectClick(items,item?.name)" v-for="(items,index) in item.serviceProjectList" :key="index">
|
||||
{{ items.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-else class="myProject" >
|
||||
<nut-empty image="empty" description="暂无项目">
|
||||
<div style="margin-top: 10px">
|
||||
</div>
|
||||
</nut-empty>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -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) => {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue