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