|
@@ -0,0 +1,106 @@
|
|
|
|
|
+<template>
|
|
|
|
|
+ <div class="task-item-container">
|
|
|
|
|
+ <el-form ref="ruleFormRef" :model="ruleForm" :rules="rules" label-width="auto">
|
|
|
|
|
+ <el-form-item label="任务名称:" prop="name">
|
|
|
|
|
+ <el-input v-model="ruleForm.name" placeholder="请输入任务名称" maxlength="200" show-word-limit />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="被检查(自查)单位:" prop="checkUnit">
|
|
|
|
|
+ <el-select v-model="ruleForm.checkUnit" placeholder="请选择被检查(自查)单位" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="检查类型:" prop="checkType">
|
|
|
|
|
+ <el-select-v2 v-model="ruleForm.checkType" placeholder="请选择检查类型" :options="TASK_TYPE_OPTIONS" />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="应完成时间:" prop="shouldCompleteTime">
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ v-model="ruleForm.shouldCompleteTime"
|
|
|
|
|
+ type="datetime"
|
|
|
|
|
+ placeholder="请选择应完成时间"
|
|
|
|
|
+ format="YYYY-MM-DD HH:mm"
|
|
|
|
|
+ date-format="MMM DD, YYYY"
|
|
|
|
|
+ time-format="HH:mm"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="检查要求:">
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="ruleForm.checkRequirement"
|
|
|
|
|
+ type="textarea"
|
|
|
|
|
+ placeholder="请输入检查要求"
|
|
|
|
|
+ :rows="3"
|
|
|
|
|
+ maxlength="500"
|
|
|
|
|
+ show-word-limit
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="创建人:">
|
|
|
|
|
+ <el-input v-model="ruleForm.createUser" disabled />
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ </div>
|
|
|
|
|
+</template>
|
|
|
|
|
+
|
|
|
|
|
+<script setup lang="ts">
|
|
|
|
|
+ import { reactive, ref } from 'vue';
|
|
|
|
|
+ import type { FormInstance, FormRules } from 'element-plus';
|
|
|
|
|
+ import { TASK_TYPE_OPTIONS } from '../constants/task-execution';
|
|
|
|
|
+
|
|
|
|
|
+ interface RuleForm {
|
|
|
|
|
+ name: string;
|
|
|
|
|
+ checkUnit: string;
|
|
|
|
|
+ checkType: string;
|
|
|
|
|
+ shouldCompleteTime: string;
|
|
|
|
|
+ checkRequirement: string;
|
|
|
|
|
+ createUser: string;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const ruleFormRef = ref<FormInstance>();
|
|
|
|
|
+ const ruleForm = reactive<RuleForm>({
|
|
|
|
|
+ name: '',
|
|
|
|
|
+ checkUnit: '',
|
|
|
|
|
+ checkType: '',
|
|
|
|
|
+ shouldCompleteTime: '',
|
|
|
|
|
+ checkRequirement: '',
|
|
|
|
|
+ createUser: 'XXX',
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ const rules = reactive<FormRules<RuleForm>>({
|
|
|
|
|
+ name: [{ required: true, message: '请输入任务名称', trigger: 'blur' }],
|
|
|
|
|
+ checkUnit: [
|
|
|
|
|
+ {
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请选择被检查(自查)单位',
|
|
|
|
|
+ trigger: 'change',
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ checkType: [
|
|
|
|
|
+ {
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请选择检查类型',
|
|
|
|
|
+ trigger: 'change',
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ shouldCompleteTime: [
|
|
|
|
|
+ {
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请选择应完成时间',
|
|
|
|
|
+ trigger: 'change',
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ });
|
|
|
|
|
+</script>
|
|
|
|
|
+
|
|
|
|
|
+<style scoped lang="scss">
|
|
|
|
|
+ .task-item-container {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ max-height: calc(100vh - 350cpx);
|
|
|
|
|
+ overflow: auto;
|
|
|
|
|
+ }
|
|
|
|
|
+ .el-form {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ width: 600cpx;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ gap: 12cpx;
|
|
|
|
|
+ }
|
|
|
|
|
+ :deep(.el-date-editor) {
|
|
|
|
|
+ --el-date-editor-width: 100%;
|
|
|
|
|
+ }
|
|
|
|
|
+</style>
|