|
@@ -39,6 +39,9 @@
|
|
|
<el-descriptions-item key="publishDate" label="发布日期:">{{ detailData.publishDate }}</el-descriptions-item>
|
|
|
<el-descriptions-item key="organizingUnit" label="编制单位:">{{ detailData.organizingUnit }}</el-descriptions-item>
|
|
|
<el-descriptions-item key="document" label="发文字号:">{{ detailData.document }}</el-descriptions-item>
|
|
|
+ <el-descriptions-item key="event_type" label="对应事件类型:">
|
|
|
+ <dict-tag :options="mm_event_type" :value="detailData.event_type" style="display: inline-block" />
|
|
|
+ </el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
</el-card>
|
|
|
</el-col>
|
|
@@ -47,7 +50,6 @@
|
|
|
<DocRecord :id="planId" />
|
|
|
</el-col>
|
|
|
<el-col :lg="30" :xs="24">
|
|
|
- <h3>单位职责</h3>
|
|
|
<UnitRecord :id="planId" />
|
|
|
</el-col>
|
|
|
<el-col :lg="30" :xs="24">
|
|
@@ -86,6 +88,11 @@
|
|
|
<el-form-item label="发文字号" prop="document">
|
|
|
<el-input v-model="form.document" placeholder="请输入发文字号" />
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="事件类型" prop="event_type">
|
|
|
+ <el-select v-model="form.event_type" placeholder="请输入对应事件类型" clearable>
|
|
|
+ <el-option v-for="item in mm_event_type" :key="item.value" :label="item.label" :value="item.value"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="预案附件" prop="fileList">
|
|
|
<file-upload v-model="form.fileList" :limit="1" :file-type="['pdf', 'doc', 'docx', 'xls', 'xlsx']" />
|
|
|
</el-form-item>
|
|
@@ -120,7 +127,7 @@ const goBack = () => {
|
|
|
/***培训记录编辑界面时间选择 */
|
|
|
const route = useRoute();
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
-const { plan_type } = toRefs<any>(proxy?.useDict('plan_type'));
|
|
|
+const { mm_event_type, plan_type } = toRefs<any>(proxy?.useDict('plan_type', 'mm_event_type'));
|
|
|
|
|
|
// 预案编辑
|
|
|
let detailData = ref({
|
|
@@ -130,6 +137,7 @@ let detailData = ref({
|
|
|
publishDate: '',
|
|
|
organizingUnit: '',
|
|
|
document: '',
|
|
|
+ event_type: '',
|
|
|
fileList: []
|
|
|
});
|
|
|
let planId = ref();
|
|
@@ -143,12 +151,14 @@ let form = ref({
|
|
|
document: '',
|
|
|
organizingUnit: '',
|
|
|
publishDate: '',
|
|
|
+ event_type: '',
|
|
|
fileList: []
|
|
|
});
|
|
|
const rules = reactive({
|
|
|
planName: [{ required: true, message: '预案名称不能为空', trigger: 'blur' }],
|
|
|
planType: [{ required: true, message: '预案类型不能为空', trigger: 'blur' }],
|
|
|
document: [{ required: true, message: '发文字号不能为空', trigger: 'blur' }],
|
|
|
+ event_type: [{ required: true, message: '对应事件类型不能为空', trigger: 'blur' }],
|
|
|
organizingUnit: [{ required: true, message: '编制单位不能为空', trigger: 'blur' }],
|
|
|
publishDate: [{ required: true, message: '发布日期不能为空', trigger: 'blur' }]
|
|
|
});
|
|
@@ -166,7 +176,9 @@ const resetForm = () => {
|
|
|
planType: '',
|
|
|
document: '',
|
|
|
organizingUnit: '',
|
|
|
- publishDate: ''
|
|
|
+ publishDate: '',
|
|
|
+ event_type: '',
|
|
|
+ fileList: []
|
|
|
};
|
|
|
demoFormRef.value?.resetFields();
|
|
|
};
|
|
@@ -174,7 +186,7 @@ const resetForm = () => {
|
|
|
const handleDelete = async () => {
|
|
|
const [err] = await to(proxy?.$modal.confirm('是否确认删除该条预案?') as any);
|
|
|
if (!err) {
|
|
|
- await deletePlan([detailData.value.planUid]);
|
|
|
+ await deletePlan([detailData.value.planId]);
|
|
|
proxy?.$modal.msgSuccess('删除成功');
|
|
|
router.go(-1);
|
|
|
}
|