feat: 新增需求
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<view class="dynamicModel-form-v jnpf-wrap jnpf-wrap-form" v-if="showPage">
|
||||
<JnpfParser :formConf="formConf" ref="dynamicForm" @submit="sumbitForm" :key="key" v-if="!loading" />
|
||||
<!-- 审批记录区域 -->
|
||||
<view v-if="approvalData.length">
|
||||
<view v-if="approvalData.length && isApproval">
|
||||
<view class="approval-title">审批记录</view>
|
||||
<view class="approval-list">
|
||||
<view
|
||||
@@ -98,12 +98,12 @@
|
||||
</view>
|
||||
|
||||
<view class="process-list" v-if="!loadingProcess">
|
||||
<u-radio-group @change="selectProcess">
|
||||
<u-radio-group v-model="selectedProcess" @change="selectProcess">
|
||||
<view
|
||||
class="process-item"
|
||||
v-for="(item, index) in processList"
|
||||
:key="item.id"
|
||||
:class="{'selected-item': selectedProcess && selectedProcess.id === item.id}"
|
||||
:class="{'selected-item': selectedProcess && selectedProcess === item.id}"
|
||||
>
|
||||
<view class="process-item-left">
|
||||
<u-radio :name="item.id">{{ item.name }}</u-radio>
|
||||
@@ -364,8 +364,6 @@
|
||||
},
|
||||
computed: {
|
||||
getOkText() {
|
||||
// btnType
|
||||
console.log(this.btnType,'btnType--')
|
||||
return this.$t('common.saveText');
|
||||
},
|
||||
getProcessText() {
|
||||
@@ -381,6 +379,10 @@
|
||||
idDsabled() {
|
||||
const {approveStatus} = this.dataForm
|
||||
return approveStatus == 2 || approveStatus == 4
|
||||
},
|
||||
isApproval(){
|
||||
const {current} = this.config
|
||||
return !!current
|
||||
}
|
||||
},
|
||||
onLoad(option) {
|
||||
@@ -423,9 +425,18 @@
|
||||
this.initMoreMenuList()
|
||||
}
|
||||
|
||||
const getNavigationTitle = () => this.dataForm.id ? this.$t('common.editText') : this.$t('common.addText')
|
||||
const getNavigationTitle = () =>{
|
||||
let titleName = ''
|
||||
if(this.config.current){
|
||||
titleName = this.config.name + '详情'
|
||||
}else {
|
||||
const name = this.dataForm.id ? this.$t('common.editText') : this.$t('common.addText')
|
||||
titleName = name + this.config.name
|
||||
}
|
||||
return titleName
|
||||
}
|
||||
uni.setNavigationBarTitle({
|
||||
title: getNavigationTitle() + this.config.name
|
||||
title: getNavigationTitle()
|
||||
})
|
||||
this.getDesForm()
|
||||
},
|
||||
@@ -563,6 +574,9 @@
|
||||
const res = await getdbformlist(this.modelId)
|
||||
if (res.code === 0 || res.code === 200) {
|
||||
this.processList = res.data || []
|
||||
if(this.processList.length === 1){
|
||||
this.selectProcess(res.data[0])
|
||||
}
|
||||
if (this.processList.length === 0) {
|
||||
uni.showToast({
|
||||
title: '暂无可用流程',
|
||||
@@ -625,6 +639,7 @@
|
||||
this.getListCreateData(params)
|
||||
},
|
||||
selectProcess(item) {
|
||||
console.log(item,'item----')
|
||||
this.selectedProcess = item
|
||||
},
|
||||
async launchSelectedProcess() {
|
||||
@@ -843,23 +858,31 @@
|
||||
};
|
||||
uni.setStorageSync('dynamicModelExtra', extra);
|
||||
const res = await getModelInfo(this.modelId, this.dataForm.id);
|
||||
console.log(res.data,'res.data111')
|
||||
console.log(res.data.jeelowcode_subtable_data,'res.data222')
|
||||
if(!!res.data.approveStatus&&(res.data.approveStatus !== 0 || res.data.approveStatus == 3)){
|
||||
// 不是未发起和驳回的都不可编辑
|
||||
this.disableAllFormFields();
|
||||
}
|
||||
this.dataForm = res.data;
|
||||
if (!res.data) return;
|
||||
const {fields = []} = this.formConf
|
||||
const result = fields.reduce((acc,current)=>{
|
||||
const key = current.__vModel__;
|
||||
if(res.data.hasOwnProperty(key)){
|
||||
acc[key] = res.data[key];
|
||||
}else if(res.data.jeelowcode_subtable_data && res.data.jeelowcode_subtable_data.hasOwnProperty(key)){
|
||||
acc[key] = res.data.jeelowcode_subtable_data[key];
|
||||
}
|
||||
return acc;
|
||||
},{})
|
||||
this.formData = {
|
||||
...res.data,
|
||||
id: this.dataForm.id,
|
||||
lc_fire_operation_detail: res.data.jeelowcode_subtable_data?.lc_fire_operation_detail || res.data?.lc_fire_operation_detail || [],
|
||||
sDate: res.data.sDate,
|
||||
eDate: res.data.eDate ? new Date(res.data.eDate).getTime() : null,
|
||||
applyDepId: res.data.applyDepId ? String(res.data.applyDepId) : '',
|
||||
applyDepName: res.data.applyDepName || '',
|
||||
applyDepData: res.data.applyDepData || null,
|
||||
...result
|
||||
};
|
||||
console.log(this.formData,'formData123')
|
||||
this.$nextTick(()=>{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<view class="menu-v">
|
||||
<view class="search-box u-m-b-20">
|
||||
<!-- <view class="search-box u-m-b-20">
|
||||
<u-search :placeholder="$t('app.apply.pleaseKeyword')" v-model="keyword" height="72" :show-action="false"
|
||||
@change="search" bg-color="#f0f2f6" shape="square" style="width: 100%;">
|
||||
</u-search>
|
||||
</view>
|
||||
</view> -->
|
||||
<mescroll-body ref="mescrollRef" @down="downCallback" :down="downOption" :sticky="false" @up="upCallback"
|
||||
:up="upOption" :bottombar="false" @init="mescrollInit" :top="mescrollTop">
|
||||
<view class="workFlow-list">
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
},
|
||||
onLoad() {
|
||||
const chatStore = useChatStore()
|
||||
if (!chatStore.getSocket) chat && chat.initSocket()
|
||||
// if (!chatStore.getSocket) chat && chat.initSocket()
|
||||
const userStore = useUserStore()
|
||||
userStore.getCurrentUser().then(() => {
|
||||
this.getSystemName()
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<view class="u-m-r-10">
|
||||
<u-avatar size="127" @click='chooseAvatar' :src='avatarSrc'></u-avatar>
|
||||
</view>
|
||||
<view class="u-flex-1 f-right" @click="personalPage('/pages/my/personalData/index')">
|
||||
<view class="u-font-36 u-m-l-16">{{baseInfo.realName}}</view>
|
||||
<view class="u-flex-1 f-right" @click="personalPage('/pages/my/personalData/index','个人中心')">
|
||||
<view class="u-font-36 u-m-l-16">{{baseInfo.nickname}}</view>
|
||||
<view class="u-m-l-10 u-p-10">
|
||||
<u-icon name="arrow-right" color="#969799" size="28"></u-icon>
|
||||
</view>
|
||||
@@ -15,7 +15,7 @@
|
||||
<view class="my-group-box-inner">
|
||||
<u-cell-group :border="false" class="cell-group">
|
||||
<view v-for="(item, idx) in group.items" :key="idx">
|
||||
<u-cell-item :title="$t(item.title)" @click="openPage(item.page, item.param)"
|
||||
<u-cell-item :title="$t(item.title)" @click="personalPage(item.page,item.name)"
|
||||
:title-style="titleStyle" :border-bottom="item.borderBottom"
|
||||
v-if="item.title!='app.my.scanCode'">
|
||||
<template #icon>
|
||||
@@ -46,7 +46,8 @@
|
||||
import {
|
||||
UpdateAvatar,
|
||||
UserSettingInfo,
|
||||
setMajor
|
||||
setMajor,
|
||||
getUserProfile,
|
||||
} from '@/api/common'
|
||||
import chat from '@/libs/chat.js'
|
||||
import {
|
||||
@@ -67,61 +68,63 @@
|
||||
avatarSrc: '',
|
||||
baseInfo: {},
|
||||
loading: false,
|
||||
cellGroups: [{
|
||||
items: [{
|
||||
title: 'app.my.organization',
|
||||
page: '/pages/my/organization/index',
|
||||
param: 'position',
|
||||
icon: 'icon-ym-zuzhi',
|
||||
color: '#6071F5',
|
||||
borderBottom: true
|
||||
},
|
||||
{
|
||||
title: 'app.my.switchIdentity',
|
||||
page: '/pages/my/identity/index',
|
||||
param: 'standing',
|
||||
icon: 'icon-ym-position1',
|
||||
color: '#F4A02F',
|
||||
borderBottom: true
|
||||
},
|
||||
{
|
||||
title: 'app.my.changeSystem',
|
||||
page: '/pages/my/changeSystem/index',
|
||||
icon: 'icon-ym-header-sys-toggle',
|
||||
color: '#3686F2',
|
||||
borderBottom: false
|
||||
},
|
||||
],
|
||||
},
|
||||
cellGroups: [
|
||||
// {
|
||||
// items: [{
|
||||
// title: 'app.my.organization',
|
||||
// page: '/pages/my/organization/index',
|
||||
// param: 'position',
|
||||
// icon: 'icon-ym-zuzhi',
|
||||
// color: '#6071F5',
|
||||
// borderBottom: true
|
||||
// },
|
||||
// {
|
||||
// title: 'app.my.switchIdentity',
|
||||
// page: '/pages/my/identity/index',
|
||||
// param: 'standing',
|
||||
// icon: 'icon-ym-position1',
|
||||
// color: '#F4A02F',
|
||||
// borderBottom: true
|
||||
// },
|
||||
// {
|
||||
// title: 'app.my.changeSystem',
|
||||
// page: '/pages/my/changeSystem/index',
|
||||
// icon: 'icon-ym-header-sys-toggle',
|
||||
// color: '#3686F2',
|
||||
// borderBottom: false
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
{
|
||||
items: [{
|
||||
title: 'app.my.personalSetting',
|
||||
page: '/pages/my/personalSetting/index',
|
||||
page: '/pages/my/personalData/index',
|
||||
icon: 'icon-ym-shezhi',
|
||||
color: '#F46E1B',
|
||||
name: '个人设置',
|
||||
borderBottom: true
|
||||
},
|
||||
{
|
||||
title: 'app.my.accountSecurity',
|
||||
page: '/pages/my/accountSecurity/index',
|
||||
icon: 'icon-ym-secure',
|
||||
color: '#26C6A1',
|
||||
borderBottom: true
|
||||
},
|
||||
{
|
||||
title: 'app.my.contacts',
|
||||
page: '/pages/my/contacts/index',
|
||||
icon: 'icon-ym-contacts',
|
||||
color: '#6071F5',
|
||||
borderBottom: true
|
||||
},
|
||||
{
|
||||
title: 'app.my.chat',
|
||||
page: '/pages/message/chat/index',
|
||||
icon: 'icon-ym-chat',
|
||||
color: '#4CBF2A',
|
||||
borderBottom: false
|
||||
},
|
||||
// {
|
||||
// title: 'app.my.accountSecurity',
|
||||
// page: '/pages/my/accountSecurity/index',
|
||||
// icon: 'icon-ym-secure',
|
||||
// color: '#26C6A1',
|
||||
// borderBottom: true
|
||||
// },
|
||||
// {
|
||||
// title: 'app.my.contacts',
|
||||
// page: '/pages/my/contacts/index',
|
||||
// icon: 'icon-ym-contacts',
|
||||
// color: '#6071F5',
|
||||
// borderBottom: true
|
||||
// },
|
||||
// {
|
||||
// title: 'app.my.chat',
|
||||
// page: '/pages/message/chat/index',
|
||||
// icon: 'icon-ym-chat',
|
||||
// color: '#4CBF2A',
|
||||
// borderBottom: false
|
||||
// },
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -161,7 +164,7 @@
|
||||
},
|
||||
onLoad() {
|
||||
const chatStore = useChatStore()
|
||||
if (!chatStore.getSocket) chat.initSocket()
|
||||
// if (!chatStore.getSocket) chat.initSocket()
|
||||
},
|
||||
onShow() {
|
||||
// UserSettingInfo().then(res => {
|
||||
@@ -169,76 +172,12 @@
|
||||
// this.avatarSrc = this.baseURL2 + this.baseInfo.avatar
|
||||
// this.loading = true
|
||||
// })
|
||||
this.baseInfo = {
|
||||
"id": "777911634713641349",
|
||||
"account": "chenl",
|
||||
"realName": "默认",
|
||||
"organize": "引迈信息技术有限公司/总裁办",
|
||||
"company": null,
|
||||
"position": "总裁",
|
||||
"manager": null,
|
||||
"roleId": "",
|
||||
"creatorTime": 1767604989000,
|
||||
"prevLogTime": 1768896697000,
|
||||
"signature": null,
|
||||
"gender": "1",
|
||||
"nation": null,
|
||||
"nativePlace": null,
|
||||
"entryDate": null,
|
||||
"certificatesType": null,
|
||||
"certificatesNumber": null,
|
||||
"education": null,
|
||||
"birthday": null,
|
||||
"telePhone": null,
|
||||
"landline": null,
|
||||
"mobilePhone": null,
|
||||
"email": null,
|
||||
"urgentContacts": null,
|
||||
"urgentTelePhone": null,
|
||||
"postalAddress": null,
|
||||
"avatar": "/api/file/Image/userAvatar/001.png",
|
||||
"theme": "W-001",
|
||||
"language": "zh-CN",
|
||||
"ranks": null,
|
||||
"isTenant": false,
|
||||
"currentTenantInfo": null,
|
||||
"preferenceJson": null,
|
||||
"propertyJson": null,
|
||||
"pcOnlineModelList": [],
|
||||
"appOnlineModelList": [
|
||||
{
|
||||
"userId": "777911634713641349",
|
||||
"userAccount": null,
|
||||
"userName": "陈力/chenl",
|
||||
"loginTime": "2026-01-20 16:11",
|
||||
"loginIPAddress": "61.183.89.14",
|
||||
"loginSystem": "iPhone 18_5",
|
||||
"tenantId": "",
|
||||
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiI3Nzc5MTE2MzQ3MTM2NDEzNDkiLCJyblN0ciI6IkdWczEzRTRBNWRkQU4zMEVIanM3d0JXOFlSQ1h5ZUs5IiwidXNlcl9pZCI6Ijc3NzkxMTYzNDcxMzY0MTM0OSIsInVzZXJfbmFtZSI6ImNoZW5sIiwic2luZ2xlTG9naW4iOjIsImV4cCI6MTc2ODk1MDY5NjYyNywidG9rZW4iOiJsb2dpbl90b2tlbl83ODMzMjk0NTA3OTUyMDQ2NzcifQ.85PXC7GbqgLEuoEcmgeuBBXyFCfgLJX-mq8_5a-cr8Y",
|
||||
"device": "APP",
|
||||
"organize": null,
|
||||
"loginBrowser": "Safari 18.5",
|
||||
"loginAddress": "湖北省武汉市 电信",
|
||||
"isCurrent": true
|
||||
},
|
||||
{
|
||||
"userId": "777911634713641349",
|
||||
"userAccount": null,
|
||||
"userName": "陈力/chenl",
|
||||
"loginTime": "2026-01-20 09:59",
|
||||
"loginIPAddress": "61.183.89.14",
|
||||
"loginSystem": "iPhone 18_5",
|
||||
"tenantId": "",
|
||||
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiI3Nzc5MTE2MzQ3MTM2NDEzNDkiLCJyblN0ciI6Ik0yVDI5T2o3cEd0bTZiZkN1aXBYUklrR3BUaTZrT0FxIiwidXNlcl9pZCI6Ijc3NzkxMTYzNDcxMzY0MTM0OSIsInVzZXJfbmFtZSI6ImNoZW5sIiwic2luZ2xlTG9naW4iOjIsImV4cCI6MTc2ODkyODM5NDcyNywidG9rZW4iOiJsb2dpbl90b2tlbl83ODMyMzU5MDk4NDY4MjcwNzcifQ.wRKZT-ZEYc4Tao8k7LI9OPlPvnBhLFrzWdQsAljQIRA",
|
||||
"device": "APP",
|
||||
"organize": null,
|
||||
"loginBrowser": "Safari 18.5",
|
||||
"loginAddress": "湖北省武汉市 电信",
|
||||
"isCurrent": false
|
||||
}
|
||||
]
|
||||
}
|
||||
this.loading = true
|
||||
getUserProfile().then(res=>{
|
||||
if(res.code == 0) {
|
||||
this.baseInfo = res.data || {}
|
||||
}
|
||||
this.loading = true
|
||||
})
|
||||
uni.setNavigationBarTitle({
|
||||
title: "我的"
|
||||
})
|
||||
@@ -286,19 +225,17 @@ this.loading = true
|
||||
url: url
|
||||
})
|
||||
},
|
||||
personalPage(path) {
|
||||
personalPage(path,name) {
|
||||
if (!path) return;
|
||||
const neededFields = [
|
||||
'realName', 'nation', 'gender', 'nativePlace', 'certificatesType',
|
||||
'certificatesNumber', 'education', 'birthday', 'telePhone', 'landline',
|
||||
'urgentContacts', 'urgentTelePhone', 'postalAddress', 'signature'
|
||||
];
|
||||
const baseInfo = neededFields.reduce((obj, key) => {
|
||||
if (this.baseInfo[key] !== undefined) {
|
||||
obj[key] = this.baseInfo[key];
|
||||
}
|
||||
return obj;
|
||||
}, {});
|
||||
const baseInfo = {
|
||||
...this.baseInfo,
|
||||
title:name,
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `${path}?baseInfo=${JSON.stringify(baseInfo)}`
|
||||
});
|
||||
|
||||
@@ -3,37 +3,52 @@
|
||||
<view style="background-color: #fff;" class="u-p-l-20 u-p-r-20">
|
||||
<u-form :model="dataForm" :errorType="['toast']" label-position="left" label-width="150" label-align="right"
|
||||
ref="dataForm">
|
||||
<u-form-item label="姓名" prop='realName' required>
|
||||
<u-input input-align='right' v-model="dataForm.realName" placeholder="请输入"></u-input>
|
||||
<u-form-item label="姓名" prop='nickname' required>
|
||||
<u-input input-align='right' v-model="dataForm.nickname" :disabled="isDisabled" placeholder="请输入"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="民族">
|
||||
<!-- <u-form-item label="民族">
|
||||
<JnpfSelect v-model="dataForm.nation" placeholder="请选择" :options='nationOptions' />
|
||||
</u-form-item>
|
||||
<u-form-item label="性别">
|
||||
<JnpfSelect v-model="dataForm.gender" placeholder="请选择" :options='genderOptions' :props='props' />
|
||||
</u-form-item>
|
||||
<u-form-item label="籍贯">
|
||||
</u-form-item> -->
|
||||
<!-- <u-form-item label="籍贯">
|
||||
<u-input input-align='right' v-model="dataForm.nativePlace" placeholder="请输入"></u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="证件类型">
|
||||
</u-form-item> -->
|
||||
<!-- <u-form-item label="证件类型">
|
||||
<JnpfSelect v-model="dataForm.certificatesType" placeholder="请选择"
|
||||
:options='certificatesTypeOptions' />
|
||||
</u-form-item>
|
||||
<u-form-item label="证件号码">
|
||||
</u-form-item> -->
|
||||
<!-- <u-form-item label="证件号码">
|
||||
<u-input input-align='right' v-model="dataForm.certificatesNumber" placeholder="请输入">
|
||||
</u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="文化程度">
|
||||
</u-form-item> -->
|
||||
<!-- <u-form-item label="文化程度">
|
||||
<JnpfSelect v-model="dataForm.education" placeholder="请选择" :options='educationOptions' />
|
||||
</u-form-item>
|
||||
<u-form-item label="出生年月">
|
||||
</u-form-item> -->
|
||||
<!-- <u-form-item label="出生年月">
|
||||
<JnpfDatePicker v-model="dataForm.birthday" placeholder="请选择" />
|
||||
</u-form-item> -->
|
||||
<u-form-item label="性别">
|
||||
<JnpfSelect v-model="dataForm.sex" placeholder="请选择" :disabled="isDisabled" :options='genderOptions' :props='props' />
|
||||
</u-form-item>
|
||||
<u-form-item label="办公电话">
|
||||
<u-input input-align='right' v-model="dataForm.telePhone" placeholder="请输入">
|
||||
<u-form-item label="手机号">
|
||||
<u-input input-align='right' v-model="dataForm.mobile" :disabled="isDisabled" placeholder="请输入">
|
||||
</u-input>
|
||||
</u-form-item>
|
||||
<u-form-item label="办公座机">
|
||||
<u-form-item label="邮箱">
|
||||
<u-input input-align='right' v-model="dataForm.email" :disabled="isDisabled" placeholder="请输入">
|
||||
</u-input>
|
||||
</u-form-item>
|
||||
<u-form-item v-if="isDisabled" label="所属部门">
|
||||
<u-input input-align='right' v-model="dataForm.deptInfoList[0].deptName" disabled placeholder="请输入">
|
||||
</u-input>
|
||||
</u-form-item>
|
||||
<u-form-item v-if="isDisabled" label="创建时间">
|
||||
<u-input input-align='right' v-model="dataForm.loginDate" disabled placeholder="请输入">
|
||||
</u-input>
|
||||
</u-form-item>
|
||||
<!-- <u-form-item label="办公座机">
|
||||
<u-input input-align='right' v-model="dataForm.landline" placeholder="请输入">
|
||||
</u-input>
|
||||
</u-form-item>
|
||||
@@ -51,10 +66,10 @@
|
||||
</u-form-item>
|
||||
<u-form-item label="自我介绍">
|
||||
<u-input input-align='right' v-model="dataForm.signature" placeholder="请输入" type="textarea" />
|
||||
</u-form-item>
|
||||
</u-form-item> -->
|
||||
</u-form>
|
||||
</view>
|
||||
<view class="flowBefore-actions">
|
||||
<view v-if="!isDisabled" class="flowBefore-actions">
|
||||
<u-button class="buttom-btn" type="primary" @click='submit'>保存</u-button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -62,7 +77,7 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
UpdateUser
|
||||
profileUpdate
|
||||
} from '@/api/common'
|
||||
import {
|
||||
useBaseStore
|
||||
@@ -94,19 +109,32 @@
|
||||
nation: "",
|
||||
nativePlace: "",
|
||||
postalAddress: "",
|
||||
realName: "",
|
||||
nickname: "",
|
||||
signature: null,
|
||||
telePhone: "",
|
||||
mobile: "",
|
||||
email: '',
|
||||
sex: null,
|
||||
deptInfoList: [],
|
||||
loginDate: '',
|
||||
urgentContacts: "",
|
||||
urgentTelePhone: "",
|
||||
id: null
|
||||
},
|
||||
nationOptions: [],
|
||||
genderOptions: [],
|
||||
genderOptions: [
|
||||
{
|
||||
fullName: '男',
|
||||
enCode: 1
|
||||
},
|
||||
{
|
||||
fullName: '女',
|
||||
enCode: 2
|
||||
}
|
||||
],
|
||||
certificatesTypeOptions: [],
|
||||
educationOptions: [],
|
||||
rules: {
|
||||
realName: [{
|
||||
nickname: [{
|
||||
required: true,
|
||||
message: '请输入姓名',
|
||||
trigger: ['change', 'blur'],
|
||||
@@ -118,6 +146,11 @@
|
||||
computed: {
|
||||
baseURL() {
|
||||
return this.define.baseURL
|
||||
},
|
||||
isDisabled() {
|
||||
const config = JSON.parse(JSON.stringify(this.personalData))
|
||||
const {title} = config
|
||||
return title == '个人中心'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -135,14 +168,15 @@
|
||||
methods: {
|
||||
init() {
|
||||
let initData = JSON.parse(JSON.stringify(this.personalData))
|
||||
for (let key in initData) {
|
||||
for (let k in this.dataForm) {
|
||||
if (key === k) {
|
||||
this.dataForm[key] = initData[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
this.getOptions()
|
||||
// for (let key in initData) {
|
||||
// for (let k in this.dataForm) {
|
||||
// if (key === k) {
|
||||
// this.dataForm[key] = initData[key]
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
this.dataForm = initData
|
||||
this.dataForm.loginDate = this.formatTime(initData.loginDate)
|
||||
},
|
||||
getOptions() {
|
||||
baseStore.getDictionaryData({
|
||||
@@ -170,8 +204,9 @@
|
||||
submit() {
|
||||
this.$refs.dataForm.validate(valid => {
|
||||
if (valid) {
|
||||
UpdateUser(this.dataForm).then(res => {
|
||||
uni.showToast({
|
||||
profileUpdate(this.dataForm).then(res => {
|
||||
if(res.code == 0) {
|
||||
uni.showToast({
|
||||
title: '保存成功',
|
||||
duration: 800,
|
||||
icon: 'none'
|
||||
@@ -179,10 +214,19 @@
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
formatTime(timestamp) {
|
||||
if (!timestamp) return '-';
|
||||
const date = new Date(timestamp);
|
||||
return `${date.getFullYear()}-${this.padZero(date.getMonth() + 1)}-${this.padZero(date.getDate())} ${this.padZero(date.getHours())}:${this.padZero(date.getMinutes())}:${this.padZero(date.getSeconds())}`;
|
||||
},
|
||||
padZero(num) {
|
||||
return num.toString().padStart(2, '0');
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -17,17 +17,23 @@
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
// this.baseInfo = JSON.parse(e.baseInfo)
|
||||
this.baseInfo = JSON.parse(e.baseInfo)
|
||||
// #ifdef MP-WEIXIN || APP-HARMONY
|
||||
this.baseInfo = JSON.parse(decodeURIComponent(e.baseInfo))
|
||||
// this.baseInfo = JSON.parse(decodeURIComponent(e.baseInfo))
|
||||
// #endif
|
||||
|
||||
// #ifndef MP-WEIXIN || APP-HARMONY
|
||||
this.baseInfo = JSON.parse(decodeURIComponent(this.jnpf.encodeContent(e.baseInfo)))
|
||||
// this.baseInfo = JSON.parse(decodeURIComponent(this.jnpf.encodeContent(e.baseInfo)))
|
||||
|
||||
// #endif
|
||||
|
||||
|
||||
},
|
||||
onShow() {
|
||||
console.log(this.baseInfo,'baseInfo------')
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.baseInfo.title
|
||||
})
|
||||
},
|
||||
methods: {}
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
this.getPortalList()
|
||||
})
|
||||
const chatStore = useChatStore()
|
||||
if (!chatStore.getSocket) chat && chat.initSocket()
|
||||
// if (!chatStore.getSocket) chat && chat.initSocket()
|
||||
uni.$on('refresh', () => {
|
||||
this.formData = [];
|
||||
this.mescroll.resetUpScroll();
|
||||
|
||||
@@ -89,9 +89,9 @@
|
||||
})
|
||||
},
|
||||
goDetail(item) {
|
||||
const {processInstance,processDefinitionId} = item
|
||||
const id = !!processDefinitionId ? item.id :processInstance.id
|
||||
const name = !!processDefinitionId ? item.name : processInstance.name
|
||||
const {processInstance,processDefinitionId,processInstanceId,processInstanceName} = item
|
||||
const id = this.category == 4 ? processInstanceId :(!!processDefinitionId ? item.id :processInstance.id)
|
||||
const name = this.category == 4 ? processInstanceName : !!processDefinitionId ? item.name : processInstance.name
|
||||
getProcessBusinessInfo(id).then(res=>{
|
||||
if(res.code == 0){
|
||||
const {dbformId,businessId} = res.data
|
||||
|
||||
Reference in New Issue
Block a user