|
@@ -54,6 +54,9 @@
|
|
<template #skill>
|
|
<template #skill>
|
|
<el-option v-for="i in skillList" :key="i.id" :label="i.label" :value="i.value"></el-option>
|
|
<el-option v-for="i in skillList" :key="i.id" :label="i.label" :value="i.value"></el-option>
|
|
</template>
|
|
</template>
|
|
|
|
+ <template #file>
|
|
|
|
+ <custom-upload model="file" :list="form.file" :limit="1" url="/files/web/cxyy_project/upload" @change="onUpload"></custom-upload>
|
|
|
|
+ </template>
|
|
<template #cooperate>
|
|
<template #cooperate>
|
|
<el-option v-for="i in cooperateList" :key="i.id" :label="i.label" :value="i.value"></el-option>
|
|
<el-option v-for="i in cooperateList" :key="i.id" :label="i.label" :value="i.value"></el-option>
|
|
</template>
|
|
</template>
|
|
@@ -143,7 +146,8 @@ const formFields = ref([
|
|
{ label: t('pages.project.track_unit'), model: 'track_unit' },
|
|
{ label: t('pages.project.track_unit'), model: 'track_unit' },
|
|
{ label: t('pages.project.source'), model: 'source' },
|
|
{ label: t('pages.project.source'), model: 'source' },
|
|
{ label: t('pages.project.is_use'), model: 'is_use', type: 'radio' },
|
|
{ label: t('pages.project.is_use'), model: 'is_use', type: 'radio' },
|
|
- { label: t('pages.project.brief'), model: 'brief', type: 'textarea' }
|
|
|
|
|
|
+ { label: t('pages.project.brief'), model: 'brief', type: 'textarea' },
|
|
|
|
+ { label: t('pages.project.file'), model: 'file', custom: true }
|
|
])
|
|
])
|
|
const rules = reactive({ name: [{ required: true, message: t('pages.project.titleMessage'), trigger: 'blur' }] })
|
|
const rules = reactive({ name: [{ required: true, message: t('pages.project.titleMessage'), trigger: 'blur' }] })
|
|
const dialog = ref({ type: '1', show: false, title: t('pages.project.addDialogTitle') })
|
|
const dialog = ref({ type: '1', show: false, title: t('pages.project.addDialogTitle') })
|
|
@@ -253,6 +257,11 @@ const toDelete = async (data) => {
|
|
search({ skip, limit })
|
|
search({ skip, limit })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+// 上传图片
|
|
|
|
+const onUpload = (e) => {
|
|
|
|
+ const { model, value } = e
|
|
|
|
+ form.value[model] = value
|
|
|
|
+}
|
|
const toSave = async () => {
|
|
const toSave = async () => {
|
|
const data = cloneDeep(form.value)
|
|
const data = cloneDeep(form.value)
|
|
const other = { status: '0' }
|
|
const other = { status: '0' }
|