更新
This commit is contained in:
parent
478530ed0f
commit
3eda54cf3a
@ -21,7 +21,7 @@ export interface FwglVO {
|
||||
processInstanceId: string // 流程实例的编号
|
||||
userId: number // 申请人的用户编号
|
||||
status: number // 审批状态
|
||||
startUserSelectAssignees:string //启动用户选择的用户信息
|
||||
startUserSelectAssignees:string | object //启动用户选择的用户信息
|
||||
curfullpath:string // 当前表单路径
|
||||
processDefinitionKey:string //流程定义的key
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
</template>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
class="custom-input"
|
||||
:model="formData"
|
||||
:rules="formRules"
|
||||
label-width="100px"
|
||||
@ -18,13 +19,13 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="起草人" prop="userName">
|
||||
<el-input v-model="formData.userName" placeholder="请输入起草人" readonly/>
|
||||
<el-input v-model="formData.userName" placeholder="请输入起草人" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="承办部门" prop="deptId">
|
||||
<el-input v-model="formData.deptId" placeholder="请输入部门信息" v-show="false" />
|
||||
<el-input v-model="formData.deptName" placeholder="请输入部门信息" readonly/>
|
||||
<el-input v-model="formData.deptName" placeholder="请输入部门信息" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -36,13 +37,13 @@
|
||||
type="datetime"
|
||||
value-format="x"
|
||||
placeholder="选择起草时间"
|
||||
readonly
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="电话号码" prop="fwglPhone">
|
||||
<el-input v-model="formData.fwglPhone" placeholder="请输入电话号码" readonly />
|
||||
<el-input v-model="formData.fwglPhone" placeholder="请输入电话号码" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -129,7 +130,7 @@ import { FwglApi, FwglVO } from '@/api/home/fwgl'
|
||||
import * as DefinitionApi from '@/api/bpm/definition'
|
||||
import * as UserApi from '@/api/system/user'
|
||||
import {useTagsViewStore} from "@/store/modules/tagsView";
|
||||
import {getUserProfile, ProfileVO} from "@/api/system/user/profile";
|
||||
import {getUserProfile} from "@/api/system/user/profile";
|
||||
import {FormProcessMappingApi} from "@/api/bpm/formprocessmapping";
|
||||
|
||||
/** 发文管理 表单 */
|
||||
@ -144,12 +145,12 @@ const { push, currentRoute } = useRouter() // 路由
|
||||
// const dialogTitle = ref('') // 弹窗的标题
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const draftButton = ref(false)
|
||||
const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
// const formType = ref('') // 表单的类型:create - 新增;update - 修改
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
title: undefined,
|
||||
userName: undefined,
|
||||
fwglTime: undefined,
|
||||
fwglTime: undefined as unknown | number,
|
||||
fwglBh: undefined,
|
||||
fwglPhone: undefined,
|
||||
fwglMj: 1,
|
||||
@ -178,19 +179,19 @@ const formRules = reactive({
|
||||
fwglJh: [{ required: true, message: '发文急缓不能为空', trigger: 'blur' }],
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
const userInfo = ref('')
|
||||
const deptInfo = ref('')
|
||||
// const userInfo = ref('')
|
||||
// const deptInfo = ref('')
|
||||
|
||||
const formatDate = (date: Date) => {
|
||||
const yyyy = date.getFullYear()
|
||||
const mm = String(date.getMonth() + 1).padStart(2, '0') // 月份从 0 开始
|
||||
const dd = String(date.getDate()).padStart(2, '0')
|
||||
const hh = String(date.getHours()).padStart(2, '0')
|
||||
const mi = String(date.getMinutes()).padStart(2, '0')
|
||||
const ss = String(date.getSeconds()).padStart(2, '0')
|
||||
// const formatDate = (date: Date) => {
|
||||
// const yyyy = date.getFullYear()
|
||||
// const mm = String(date.getMonth() + 1).padStart(2, '0') // 月份从 0 开始
|
||||
// const dd = String(date.getDate()).padStart(2, '0')
|
||||
// const hh = String(date.getHours()).padStart(2, '0')
|
||||
// const mi = String(date.getMinutes()).padStart(2, '0')
|
||||
// const ss = String(date.getSeconds()).padStart(2, '0')
|
||||
|
||||
return `${yyyy}-${mm}-${dd} ${hh}:${mi}:${ss}`
|
||||
}
|
||||
// return `${yyyy}-${mm}-${dd} ${hh}:${mi}:${ss}`
|
||||
// }
|
||||
const getUserInfo = async () => {
|
||||
const users = await getUserProfile()
|
||||
|
||||
@ -205,8 +206,8 @@ const getUserInfo = async () => {
|
||||
formData.value.userName = users.nickname
|
||||
}
|
||||
|
||||
if (formData.value.fwglTime == '' || formData.value.fwglTime == undefined) {
|
||||
formData.value.fwglTime = formatDate(new Date())
|
||||
if (formData.value.fwglTime === undefined) {
|
||||
formData.value.fwglTime = Date.now();
|
||||
}
|
||||
if (formData.value.fwglPhone == '' || formData.value.fwglPhone == undefined) {
|
||||
formData.value.fwglPhone = users.mobile
|
||||
@ -291,33 +292,33 @@ const submitForm = async () => {
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
formData.value = {
|
||||
id: undefined,
|
||||
title: undefined,
|
||||
userName: undefined,
|
||||
fwglTime: undefined,
|
||||
fwglBh: undefined,
|
||||
fwglPhone: undefined,
|
||||
fwglMj: 1,
|
||||
fwglJh: 1,
|
||||
fwglSendDeptid: undefined,
|
||||
fwglSendName: undefined,
|
||||
fwglHqDeptid: undefined,
|
||||
fwglHqName: undefined,
|
||||
createTime: 0,
|
||||
fileStatus:undefined,
|
||||
filePath: undefined,
|
||||
attachStatus: undefined,
|
||||
attachPath: undefined,
|
||||
deptId: undefined,
|
||||
deptName: undefined,
|
||||
processInstanceId: undefined,
|
||||
userId: undefined,
|
||||
status: undefined,
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
// const resetForm = () => {
|
||||
// formData.value = {
|
||||
// id: undefined,
|
||||
// title: undefined,
|
||||
// userName: undefined,
|
||||
// fwglTime: undefined,
|
||||
// fwglBh: undefined,
|
||||
// fwglPhone: undefined,
|
||||
// fwglMj: 1,
|
||||
// fwglJh: 1,
|
||||
// fwglSendDeptid: undefined,
|
||||
// fwglSendName: undefined,
|
||||
// fwglHqDeptid: undefined,
|
||||
// fwglHqName: undefined,
|
||||
// createTime: 0,
|
||||
// fileStatus:undefined,
|
||||
// filePath: undefined,
|
||||
// attachStatus: undefined,
|
||||
// attachPath: undefined,
|
||||
// deptId: undefined,
|
||||
// deptName: undefined,
|
||||
// processInstanceId: undefined,
|
||||
// userId: undefined,
|
||||
// status: undefined,
|
||||
// }
|
||||
// formRef.value?.resetFields()
|
||||
// }
|
||||
//根据时间戳获取年月日
|
||||
const getNow = (date:number)=>{
|
||||
const now = new Date(date);
|
||||
|
Loading…
Reference in New Issue
Block a user