|
|
|
@ -10,7 +10,10 @@
|
|
|
|
|| item.field==='company_product' || item.field==='company_introduce'">
|
|
|
|
|| item.field==='company_product' || item.field==='company_introduce'">
|
|
|
|
<u-input type="textarea" :placeholder="item.help?item.help:'请输入'" v-model="item.value" />
|
|
|
|
<u-input type="textarea" :placeholder="item.help?item.help:'请输入'" v-model="item.value" />
|
|
|
|
</block> -->
|
|
|
|
</block> -->
|
|
|
|
<u-input :type="item.field==='introduce'||
|
|
|
|
<u-input v-if="item.field==='company_name'"
|
|
|
|
|
|
|
|
@click="showCompanySelector = true" type="select" v-model="item.value" border :placeholder="item.help?item.help:'请选择公司名称'" />
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<u-input v-else :type="item.field==='introduce'||
|
|
|
|
item.field==='company_fund'|| item.field==='company_product'||
|
|
|
|
item.field==='company_fund'|| item.field==='company_product'||
|
|
|
|
item.field==='company_introduce'?'textarea':'text'" maxlength="9999" :placeholder="item.help?item.help:'请输入'" v-model="item.value" />
|
|
|
|
item.field==='company_introduce'?'textarea':'text'" maxlength="9999" :placeholder="item.help?item.help:'请输入'" v-model="item.value" />
|
|
|
|
</block>
|
|
|
|
</block>
|
|
|
|
@ -62,7 +65,8 @@
|
|
|
|
<u-picker @confirm="dateConfirm" mode="time" v-model="dateShow" :params="dateParams"></u-picker>
|
|
|
|
<u-picker @confirm="dateConfirm" mode="time" v-model="dateShow" :params="dateParams"></u-picker>
|
|
|
|
<!-- 日期时间 -->
|
|
|
|
<!-- 日期时间 -->
|
|
|
|
<u-picker @confirm="dateTimeConfirm" mode="time" v-model="dateTimeShow" :params="dateTimeParams"></u-picker>
|
|
|
|
<u-picker @confirm="dateTimeConfirm" mode="time" v-model="dateTimeShow" :params="dateTimeParams"></u-picker>
|
|
|
|
|
|
|
|
<!-- 公司选择器 -->
|
|
|
|
|
|
|
|
<company-selector v-model="showCompanySelector" @confirm="handleCompanyConfirm"></company-selector>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
@ -71,7 +75,11 @@
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
ROOTPATH as baseUrl
|
|
|
|
ROOTPATH as baseUrl
|
|
|
|
} from "@/common/config.js"
|
|
|
|
} from "@/common/config.js"
|
|
|
|
|
|
|
|
import CompanySelector from '@/components/company-selector/company-selector.vue'
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
|
|
|
|
components: {
|
|
|
|
|
|
|
|
CompanySelector
|
|
|
|
|
|
|
|
},
|
|
|
|
props: {
|
|
|
|
props: {
|
|
|
|
course_forms: {
|
|
|
|
course_forms: {
|
|
|
|
type: Array,
|
|
|
|
type: Array,
|
|
|
|
@ -82,6 +90,7 @@
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
|
|
|
|
showCompanySelector: false,
|
|
|
|
submitForm: {},
|
|
|
|
submitForm: {},
|
|
|
|
now_fileld: 0, // 当前所操作的 filed index值
|
|
|
|
now_fileld: 0, // 当前所操作的 filed index值
|
|
|
|
// 单选
|
|
|
|
// 单选
|
|
|
|
@ -130,6 +139,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
// 处理公司选择确认事件
|
|
|
|
|
|
|
|
handleCompanyConfirm(company) {
|
|
|
|
|
|
|
|
console.log('选中的公司:', company);
|
|
|
|
|
|
|
|
this.course_forms.map(item1 => {
|
|
|
|
|
|
|
|
if (item1.field === 'company_name') {
|
|
|
|
|
|
|
|
this.$set(item1,'value',company.enterpriseName||'')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (item1.field === 'company_date') {
|
|
|
|
|
|
|
|
this.$set(item1,'value',company.startDate||'')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (item1.field === 'company_product') {
|
|
|
|
|
|
|
|
this.$set(item1,'value',company.businessScope||'')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (item1.field === 'company_type') {
|
|
|
|
|
|
|
|
const company_type = company.tagList && Array.isArray(company.tagList)?company.tagList.join(','):''
|
|
|
|
|
|
|
|
const _arr = company_type.split(',')
|
|
|
|
|
|
|
|
this.$set(item1,'value',company_type)
|
|
|
|
|
|
|
|
item1.select_item.forEach(item2 => {
|
|
|
|
|
|
|
|
console.log("item2",item2)
|
|
|
|
|
|
|
|
// 检查 item.value 是否存在于数组 b 中
|
|
|
|
|
|
|
|
const exists = _arr.includes(item2.value);
|
|
|
|
|
|
|
|
// 根据检查结果设置 checked 属性
|
|
|
|
|
|
|
|
item2.checked = exists;
|
|
|
|
|
|
|
|
this.$set(item2,'checked',exists)
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (item1.field === 'company_area') {
|
|
|
|
|
|
|
|
this.$set(item1,'value',company.country||'')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (item1.field === 'company_address') {
|
|
|
|
|
|
|
|
this.$set(item1,'value',company.address||'')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (item1.field === 'is_yuanhe') {
|
|
|
|
|
|
|
|
this.$set(item1,'value',company.isYhInvested?'是':'否')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
console.log("this.course_forms",this.course_forms)
|
|
|
|
|
|
|
|
},
|
|
|
|
// 单选
|
|
|
|
// 单选
|
|
|
|
showSelect(item, index) {
|
|
|
|
showSelect(item, index) {
|
|
|
|
this.selectList = item.select_item
|
|
|
|
this.selectList = item.select_item
|
|
|
|
|