bug fixed
This commit is contained in:
@ -1,7 +1,12 @@
|
||||
<!-- 企业需求弹框 -->
|
||||
<template>
|
||||
<el-dialog title="基本信息" v-model="isShow">
|
||||
<el-form ref="formRef" :model="modelValue" :label-width="labelWidth + 'px'">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="modelValue"
|
||||
:label-width="labelWidth + 'px'"
|
||||
disabled
|
||||
>
|
||||
<p><b>基本信息</b></p>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
@ -23,17 +28,6 @@
|
||||
>{{ item.name }}</el-checkbox
|
||||
>
|
||||
</el-checkbox-group>
|
||||
<!-- <el-row :gutter="20">
|
||||
<el-col :span="20">
|
||||
<el-input
|
||||
v-model="checkInput"
|
||||
placeholder="请输入需求类别"
|
||||
></el-input>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-button type="primary" @click="addCheck">添加</el-button>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -42,11 +36,12 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item label="需求描述:" prop="introduce">
|
||||
<!-- <Editor v-model="modelValue.add" :minHeight="150" /> -->
|
||||
<wangEditor
|
||||
<WangEditor
|
||||
v-model="modelValue.introduce"
|
||||
width="100%"
|
||||
min-height="150px"
|
||||
></wangEditor>
|
||||
readOnly
|
||||
></WangEditor>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -59,6 +54,7 @@
|
||||
<FieldOptions
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
disabled
|
||||
ref="fieldFormRef"
|
||||
/>
|
||||
|
||||
@ -149,6 +145,7 @@
|
||||
v-model="modelValue"
|
||||
title="想合作的单位及模式"
|
||||
placeholder=""
|
||||
disabled
|
||||
fieldKey="wants"
|
||||
ref="directionsFormRef"
|
||||
/>
|
||||
@ -156,16 +153,19 @@
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button type="primary">驳回</el-button>
|
||||
<el-button type="primary">通过需求</el-button>
|
||||
<el-button type="primary" @click="approve('2')">驳回</el-button>
|
||||
<el-button type="primary" @click="approve('1')">通过需求</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup>
|
||||
import { updateTechnologyDemand } from "@/api/dataApproval/enterpriseTechnologyDemand";
|
||||
import WangEditor from "@/components/WangEditor";
|
||||
import FieldOptions from "@/views/components/FieldOptions";
|
||||
import InputBoxAdd from "@/views/components/InputBoxAdd";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { ref, toRefs } from "vue";
|
||||
const emit = defineEmits(["update-list"]);
|
||||
const props = defineProps({
|
||||
isShow: {
|
||||
type: Boolean,
|
||||
@ -196,5 +196,12 @@ const checkList = reactive([
|
||||
name: "上市辅导",
|
||||
},
|
||||
]);
|
||||
const approve = async (status) => {
|
||||
let title = status == 1 ? "通过" : "驳回";
|
||||
await updateTechnologyDemand({ id: modelValue.value.id, status });
|
||||
ElMessage.success(`已${title}需求`);
|
||||
emit("update:is-show", false);
|
||||
emit("update-list");
|
||||
};
|
||||
</script>
|
||||
<style></style>
|
||||
|
||||
@ -156,19 +156,20 @@ const validateForm = async () => {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
// watch(modelValue, (val) => {
|
||||
// console.log(val);
|
||||
// });
|
||||
|
||||
getProvinceList();
|
||||
watch(modelValue, (val) => {
|
||||
if (val.province) {
|
||||
getCityListByProvinceId(val.province);
|
||||
}
|
||||
if (val.city) {
|
||||
getAreaListByCityId(val.city);
|
||||
}
|
||||
});
|
||||
watch(
|
||||
modelValue,
|
||||
(val) => {
|
||||
if (val.province) {
|
||||
getCityListByProvinceId(val.province);
|
||||
}
|
||||
if (val.city) {
|
||||
getAreaListByCityId(val.city);
|
||||
}
|
||||
},
|
||||
{ deep: true }
|
||||
);
|
||||
|
||||
defineExpose({
|
||||
validateForm,
|
||||
|
||||
@ -3,13 +3,19 @@
|
||||
ref="formRef"
|
||||
:model="modelValue"
|
||||
:rules="rules"
|
||||
:disabled="!isAdd"
|
||||
:label-width="labelWidth + 'px'"
|
||||
>
|
||||
<div class="form_title" v-if="showTitle">基本信息</div>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item :label="imageName" prop="image">
|
||||
<ImageUpload v-model="modelValue.image" :fileSize="2" :limit="1" />
|
||||
<ImageUpload
|
||||
:disabled="!isAdd"
|
||||
v-model="modelValue.image"
|
||||
:fileSize="2"
|
||||
:limit="1"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -129,6 +135,7 @@
|
||||
</el-row> -->
|
||||
|
||||
<CityOptions
|
||||
:disabled="!isAdd"
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
ref="cityFormRef"
|
||||
@ -203,12 +210,14 @@
|
||||
</el-row>
|
||||
|
||||
<FieldOptions
|
||||
:disabled="!isAdd"
|
||||
v-model="modelValue"
|
||||
:labelWidth="labelWidth"
|
||||
ref="fieldFormRef"
|
||||
/>
|
||||
|
||||
<InputBoxAdd
|
||||
:disabled="!isAdd"
|
||||
:labelWidth="labelWidth"
|
||||
v-model="modelValue"
|
||||
title="关键词"
|
||||
@ -232,6 +241,7 @@
|
||||
:labelWidth="labelWidth"
|
||||
v-model="modelValue"
|
||||
title="生产方向"
|
||||
:disabled="!isAdd"
|
||||
placeholder="请输入生产方向"
|
||||
fieldKey="directions"
|
||||
ref="directionsFormRef"
|
||||
@ -273,7 +283,12 @@
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 6 }"
|
||||
/>
|
||||
<WangEditor v-else v-model="modelValue.introduce" minHeight="150px" />
|
||||
<WangEditor
|
||||
:readOnly="!isAdd"
|
||||
v-else
|
||||
v-model="modelValue.introduce"
|
||||
minHeight="150px"
|
||||
/>
|
||||
<!-- <Editor
|
||||
v-else
|
||||
v-model="modelValue.introduce"
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="所属领域:" prop="industrys" :show-message="false">
|
||||
<el-form-item label="所属领域:" prop="industrys" :show-message="false">
|
||||
<el-row type="flex" justify="space-between">
|
||||
<el-col :span="6">
|
||||
<el-form-item >
|
||||
<el-form-item>
|
||||
<el-select
|
||||
v-model="fields[0]"
|
||||
value-key="id"
|
||||
@ -94,7 +94,7 @@
|
||||
// import { industry } from "@/api/config";
|
||||
import { listSysIndustry } from "@/api/platform/industry";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { toRefs, watch ,reactive} from "vue";
|
||||
import { toRefs, watch, reactive } from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: Object,
|
||||
@ -119,7 +119,7 @@ const data = reactive({
|
||||
industrys: [
|
||||
{
|
||||
type: "array",
|
||||
required:true,
|
||||
required: true,
|
||||
message: "请选择并添加",
|
||||
trigger: "change",
|
||||
},
|
||||
@ -172,7 +172,7 @@ const getFieldNameById = (ids) => {
|
||||
const fieldAdd = () => {
|
||||
if (!fields.value.length) return ElMessage.error("请选择领域类型");
|
||||
// 移除校验
|
||||
formRef.value.clearValidate()
|
||||
formRef.value.clearValidate();
|
||||
industrysTags.value.push(fields.value);
|
||||
modelValue.value.industrys.push(fields.value.join("-"));
|
||||
fields.value = [];
|
||||
@ -212,38 +212,46 @@ const validateForm = async () => {
|
||||
|
||||
getIndustryTreeData();
|
||||
|
||||
watch(modelValue, (newVal) => {
|
||||
modelValue.value.industrys = [];
|
||||
modelValue.value.industrys.push(...modelValue.value.industry.split(","));
|
||||
for (const field of modelValue.value.industry.split(",")) {
|
||||
industrysTags.value.push(field.split("-").map((el) => parseInt(el)));
|
||||
}
|
||||
// let _key = [];
|
||||
// let _value = [];
|
||||
// for (let i = 0; i < newVal.industrys.length; i++) {
|
||||
// const item = newVal.industrys[i];
|
||||
// _key.push(item.key);
|
||||
// _value.push(item.value);
|
||||
// }
|
||||
// newVal.industrys = _key;
|
||||
// let keyObj = [];
|
||||
// for (let i = 0; i < _key.length; i++) {
|
||||
// keyObj.push([]);
|
||||
// let array = _key[i].split("-");
|
||||
// for (let j = 0; j < array.length; j++) {
|
||||
// keyObj[i].push({
|
||||
// id: array[j],
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// for (let i = 0; i < _value.length; i++) {
|
||||
// let array = _value[i].split(">");
|
||||
// for (let j = 0; j < array.length; j++) {
|
||||
// keyObj[i][j]["name"] = array[j];
|
||||
// }
|
||||
// }
|
||||
// industrysTags.value = keyObj;
|
||||
});
|
||||
watch(
|
||||
modelValue,
|
||||
(newVal) => {
|
||||
modelValue.value.industrys = [];
|
||||
console.log(modelValue.value.industry ? 1 : 0);
|
||||
let industrysList = modelValue.value.industry
|
||||
? modelValue.value.industry.split(",")
|
||||
: [];
|
||||
modelValue.value.industrys.push(...industrysList);
|
||||
for (const field of industrysList) {
|
||||
industrysTags.value.push(field.split("-").map((el) => parseInt(el)));
|
||||
}
|
||||
// let _key = [];
|
||||
// let _value = [];
|
||||
// for (let i = 0; i < newVal.industrys.length; i++) {
|
||||
// const item = newVal.industrys[i];
|
||||
// _key.push(item.key);
|
||||
// _value.push(item.value);
|
||||
// }
|
||||
// newVal.industrys = _key;
|
||||
// let keyObj = [];
|
||||
// for (let i = 0; i < _key.length; i++) {
|
||||
// keyObj.push([]);
|
||||
// let array = _key[i].split("-");
|
||||
// for (let j = 0; j < array.length; j++) {
|
||||
// keyObj[i].push({
|
||||
// id: array[j],
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// for (let i = 0; i < _value.length; i++) {
|
||||
// let array = _value[i].split(">");
|
||||
// for (let j = 0; j < array.length; j++) {
|
||||
// keyObj[i][j]["name"] = array[j];
|
||||
// }
|
||||
// }
|
||||
// industrysTags.value = keyObj;
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
defineExpose({
|
||||
validateForm,
|
||||
|
||||
@ -1,76 +1,40 @@
|
||||
<template>
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="value"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
:label-width="labelWidth + 'px'"
|
||||
>
|
||||
<div class="form_title" v-if="showTitle">基本信息</div>
|
||||
|
||||
<el-alert
|
||||
v-if="value.mode == 2"
|
||||
style="margin-bottom: 20px"
|
||||
title="1创新币=1元"
|
||||
type="warning"
|
||||
show-icon
|
||||
:closable="false"
|
||||
></el-alert>
|
||||
|
||||
<el-row v-if="value.mode == 2">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="视频定价:">
|
||||
<el-input v-model="value.title" placeholder="请输入创新币个数">
|
||||
<template #append>创新币</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="免费观看时长:">
|
||||
<el-input v-model="value.title" placeholder="默认视频的1/3时长">
|
||||
<template #append>min</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row v-if="value.mode == 2">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="视频文件:">
|
||||
<FileUpload v-model="value.file2" :limit="1" :fileType="['mp4']" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="form_title">
|
||||
<p><b>基本信息</b></p>
|
||||
</div>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="成果名称:" prop="title">
|
||||
<el-form-item label="产品名称:" prop="title">
|
||||
<el-input
|
||||
v-model="value.title"
|
||||
placeholder="请输入成果名称"
|
||||
v-model="form.title"
|
||||
placeholder="请输入产品名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<FieldOptions v-model="value" :labelWidth="labelWidth" ref="fieldForm" />
|
||||
<FieldOptions v-model="form" :labelWidth="labelWidth" ref="fieldFormRef" />
|
||||
|
||||
<InputBoxAdd
|
||||
:labelWidth="labelWidth"
|
||||
v-model="value"
|
||||
v-model="form"
|
||||
title="应用客户"
|
||||
placeholder="请输入应用客户"
|
||||
fieldKey="customer"
|
||||
ref="customerForm"
|
||||
fieldKey="customers"
|
||||
ref="customerFormRef"
|
||||
/>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="成果成熟度:" prop="maturity">
|
||||
<el-select
|
||||
v-model="value.maturity"
|
||||
clearable
|
||||
placeholder="请选择成果成熟度"
|
||||
>
|
||||
<el-form-item label="产品成熟度:" prop="maturity">
|
||||
<el-select v-model="form.maturity" clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in maturityOptions"
|
||||
:key="item.key"
|
||||
@ -84,12 +48,8 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="成果领先性:" prop="lead_standard">
|
||||
<el-select
|
||||
v-model="value.lead_standard"
|
||||
clearable
|
||||
placeholder="请选择成果领先性"
|
||||
>
|
||||
<el-form-item label="成果领先性:" prop="leadStandard">
|
||||
<el-select v-model="form.leadStandard" clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in leadOptions"
|
||||
:key="item.key"
|
||||
@ -105,9 +65,9 @@
|
||||
<el-col :span="24">
|
||||
<el-form-item label="合作模式:">
|
||||
<el-select
|
||||
v-model="value.cooperation_mode"
|
||||
v-model="form.cooperationMode"
|
||||
clearable
|
||||
placeholder="请选择合作模式"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in cooperationOptions"
|
||||
@ -122,18 +82,8 @@
|
||||
</el-row>
|
||||
|
||||
<InputBoxAdd
|
||||
v-if="value.mode == 2"
|
||||
:labelWidth="labelWidth"
|
||||
v-model="value"
|
||||
title="应用场景"
|
||||
placeholder="请输入应用场景"
|
||||
fieldKey="kws"
|
||||
ref="directionsForm"
|
||||
/>
|
||||
|
||||
<InputBoxAdd
|
||||
:labelWidth="labelWidth"
|
||||
v-model="value"
|
||||
v-model="form"
|
||||
title="关键词"
|
||||
placeholder="请输入关键词"
|
||||
fieldKey="keywords"
|
||||
@ -142,26 +92,20 @@
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="成果简介:" prop="description">
|
||||
<el-input
|
||||
v-model="value.description"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 8 }"
|
||||
<el-form-item label="产品简介:" prop="introduce">
|
||||
<wangEditor
|
||||
v-model="form.introduce"
|
||||
min-height="150px"
|
||||
width="100%"
|
||||
ref="introduceRef"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="成果来源:">
|
||||
<Editor v-model="value.introduce" :minHeight="150" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="value.mode == 1">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="成果图片:" prop="image">
|
||||
<ImageUpload v-model="value.image" :isShowTip="false" :limit="1" />
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品图片:" prop="image">
|
||||
<ImageUpload v-model="form.image" :limit="1" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -170,21 +114,36 @@
|
||||
</p>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="成熟度证明材料:">
|
||||
<el-form-item label="证明材料:" prop="material">
|
||||
<FileUpload
|
||||
v-model="value.file"
|
||||
v-model="form.material"
|
||||
:limit="1"
|
||||
:fileType="['doc', 'xls', 'ppt', 'txt', 'pdf', 'jpg']"
|
||||
:fileType="['doc', 'xls', 'pdf', 'jpg', 'png', 'zip']"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
<script setup>
|
||||
import CityOptions from "@/views/components/CityOptions";
|
||||
import FieldOptions from "@/views/components/FieldOptions";
|
||||
import InputBoxAdd from "@/views/components/InputBoxAdd";
|
||||
import { reactive } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
|
||||
const route = useRoute();
|
||||
const data = reactive({
|
||||
form: {},
|
||||
});
|
||||
|
||||
const getAchievementInfo = async () => {
|
||||
|
||||
};
|
||||
</script>
|
||||
|
||||
<!-- <script>
|
||||
export default {
|
||||
components: {
|
||||
CityOptions,
|
||||
@ -245,7 +204,7 @@ export default {
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
</script> -->
|
||||
<style lang="scss" scoped>
|
||||
.form_title {
|
||||
font-weight: 700;
|
||||
@ -262,4 +221,4 @@ export default {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user