Sfoglia il codice sorgente

修改地区转化

zs 1 anno fa
parent
commit
0ab75179ba

+ 1 - 0
src/views/achievement/detail.vue

@@ -223,6 +223,7 @@ const getDict = (data, model) => {
 // 地区
 const getArea = (data) => {
   if (data) return data.join(',')
+  else return '暂无地区'
 }
 // 附件下载
 const toFile = () => {

+ 2 - 1
src/views/achievement/index.vue

@@ -48,7 +48,7 @@
                 </el-col>
                 <el-col :span="8" class="other_1">
                   <span>成果地区:</span>
-                  {{ getArea(item.area || '暂无成果地区') }}
+                  {{ getArea(item.area) }}
                 </el-col>
                 <el-col :span="8" class="other_1">
                   <span>单位:</span>
@@ -240,6 +240,7 @@ const getDict = (data, model) => {
 // 地区显示
 const getArea = (data) => {
   if (data) return data.join(',')
+  else return '暂无地区'
 }
 const currentPage = ref(1)
 // 分页

+ 2 - 1
src/views/company/detail.vue

@@ -84,7 +84,7 @@
                         <span>技术领域:</span>{{ getDict(item.field || '暂无技术领域', 'field') }}
                       </el-col>
                       <el-col :span="24" class="two_1">
-                        <span>成果地区:</span>{{ getArea(item.area || '暂无成果地区') }}
+                        <span>成果地区:</span>{{ getArea(item.area) }}
                       </el-col>
                       <el-col :span="24" class="two_1">
                         <span>单位:</span>{{ item.user || '暂无单位' }}
@@ -204,6 +204,7 @@ const getDict = (data, model) => {
 // 地区
 const getArea = (data) => {
   if (data) return data.join(',')
+  else return '暂无地区'
 }
 // 在线洽谈
 const toChat = () => {

+ 1 - 0
src/views/demand/detail.vue

@@ -208,6 +208,7 @@ const getTime = (data) => {
 // 地区
 const getArea = (data) => {
   if (data) return data.join(',')
+  else return '暂无地区'
 }
 // 在线洽谈
 const toChat = () => {

+ 2 - 1
src/views/demand/index.vue

@@ -88,7 +88,7 @@
                 </el-col>
                 <el-col :span="8" class="other_1">
                   <span>需求地区:</span>
-                  {{ getArea(item.area || '暂无需求地区') }}
+                  {{ getArea(item.area) }}
                 </el-col>
                 <el-col :span="8" class="other_1">
                   <span>单位:</span>
@@ -256,6 +256,7 @@ const getDict = (data, model) => {
 // 地区显示
 const getArea = (data) => {
   if (data) return data.join(',')
+  else return '暂无地区'
 }
 // 选择查询
 const toSelect = (data, item) => {

+ 5 - 7
src/views/expert/detail.vue

@@ -22,12 +22,8 @@
                     }}</el-tag>
                   </div>
                 </el-col>
-                <div class="other">
-                  <span> 所在地区:</span>{{ getArea(info.area || '暂无地区') }}
-                </div>
-                <div class="other">
-                  <span> 技术领域:</span>{{ getDict(info.field || '暂无', 'field') }}
-                </div>
+                <div class="other"><span> 所在地区:</span>{{ getArea(info.area) }}</div>
+                <div class="other"><span> 技术领域:</span>{{ getDict(info.field, 'field') }}</div>
                 <div class="other"><span> 研究方向:</span>{{ info.direction || '暂无' }}</div>
               </el-col>
               <el-col :span="6" class="one_3">
@@ -59,7 +55,7 @@
                         <span>技术领域:</span>{{ getDict(item.field || '暂无技术领域', 'field') }}
                       </el-col>
                       <el-col :span="24" class="two_1">
-                        <span>成果地区:</span>{{ getArea(item.area || '暂无成果地区') }}
+                        <span>成果地区:</span>{{ getArea(item.area) }}
                       </el-col>
                       <el-col :span="24" class="two_1">
                         <span>单位:</span>{{ item.user || '暂无单位' }}
@@ -133,6 +129,7 @@ onMounted(async () => {
 })
 const search = async () => {
   let id = route.query.id
+  console.log(id)
   if (id) {
     let res = await store.fetch(id)
     if (res.errcode == '0') info.value = res.data
@@ -174,6 +171,7 @@ const getDict = (data, model) => {
 // 地区
 const getArea = (data) => {
   if (data) return data.join(',')
+  else return '暂无地区'
 }
 // 在线洽谈
 const toChat = () => {

+ 2 - 1
src/views/expert/index.vue

@@ -41,7 +41,7 @@
                   </el-col>
                   <el-col :span="24" class="two_1">
                     <span>所在地区:</span>
-                    {{ getArea(item.area || '暂无地区') }}
+                    {{ getArea(item.area) }}
                   </el-col>
                   <el-col :span="24" class="two_1">
                     <span>技术领域:</span>
@@ -219,6 +219,7 @@ const getDict = (data, model) => {
 // 地区显示
 const getArea = (data) => {
   if (data) return data.join(',')
+  else return '暂无地区'
 }
 // 联络专家
 const toChat = (item) => {

+ 9 - 3
src/views/home/index.vue

@@ -139,13 +139,13 @@
                       </el-tooltip>
                     </el-col>
                     <el-col :span="3" class="content textOver">
-                      {{ getArea(item.area || '暂无地区') }}
+                      {{ getArea(item.area) }}
                     </el-col>
                     <el-col :span="3" class="content textOver">
-                      {{ getDict(item.education || '学历/职称', 'maturity') }}
+                      {{ getDict(item.education || '学历/职称', 'education') }}
                     </el-col>
                     <el-col :span="3" class="content textOver">
-                      {{ getDict(item.field || '暂无技术领域', 'maturity') }}
+                      {{ getDict(item.field || '暂无技术领域', 'field') }}
                     </el-col>
                     <el-col :span="3" class="content textOver">
                       {{ item.unit || '暂无工作单位' }}
@@ -338,6 +338,7 @@ const statusList = ref([])
 const fieldList = ref([])
 const patternList = ref([])
 const scaleList = ref([])
+const educationList = ref([])
 // 成果
 const achievementList = ref([])
 // 专家
@@ -359,6 +360,9 @@ onMounted(async () => {
 })
 const searchOther = async () => {
   let result
+  // 学历
+  result = await dictDataStore.query({ code: 'education', is_use: '0' })
+  if ($checkRes(result)) educationList.value = result.data
   // 合作类型
   result = await dictDataStore.query({ code: 'projectType', is_use: '0' })
   if ($checkRes(result)) projectList.value = result.data
@@ -436,6 +440,7 @@ const searchAchieve = async () => {
 const getDict = (data, model) => {
   let res
   if (model == 'cooperate') res = projectList.value.find((f) => f.value == data)
+  else if (model == 'education') res = educationList.value.find((f) => f.value == data)
   else if (model == 'maturity') res = maturityList.value.find((f) => f.value == data)
   else if (model == 'type') res = industryList.value.find((f) => f.value == data)
   else if (model == 'status') res = statusList.value.find((f) => f.value == data)
@@ -447,6 +452,7 @@ const getDict = (data, model) => {
 // 地区显示
 const getArea = (data) => {
   if (data) return data.join(',')
+  else return '暂无地区'
 }
 // 查看详情
 const toView = (item, type) => {

+ 2 - 1
src/views/project/detail.vue

@@ -91,7 +91,7 @@
                       <span>技术领域:</span>{{ getDict(item.field || '暂无技术领域', 'field') }}
                     </el-col>
                     <el-col :span="24" class="two_1">
-                      <span>成果地区:</span>{{ getArea(item.area || '暂无成果地区') }}
+                      <span>成果地区:</span>{{ getArea(item.area) }}
                     </el-col>
                     <el-col :span="24" class="two_1">
                       <span>单位:</span>{{ item.user || '暂无单位' }}
@@ -217,6 +217,7 @@ const getDict = (data, model) => {
 // 地区
 const getArea = (data) => {
   if (data) return data.join(',')
+  else return '暂无地区'
 }
 // 在线洽谈
 const toChat = () => {

+ 1 - 1
src/views/register/parts/company.vue

@@ -332,7 +332,7 @@ const rules = reactive({
 // 上传图片
 const onFUpload = (e) => {
   const { model, value } = e
-  form.value.footInfo[model] = value
+  form.value.info[model] = value
 }
 // 注册
 const submitForm = async (formEl) => {

+ 17 - 0
src/views/register/parts/expert.vue

@@ -93,6 +93,18 @@
         </el-col>
       </el-row>
       <el-col :span="24" class="text">专家信息</el-col>
+      <el-row>
+        <el-form-item label="头像" prop="info.icon">
+          <custom-upload
+            model="icon"
+            :list="form.info.icon"
+            :limit="1"
+            url="/files/web/template/expert/upload"
+            @change="onFUpload"
+            listType="picture-card"
+          ></custom-upload>
+        </el-form-item>
+      </el-row>
       <el-row :gutter="20">
         <el-col :span="12">
           <el-form-item label="专家姓名" prop="info.name">
@@ -281,6 +293,11 @@ const rules = reactive({
   'info.education': [{ required: true, message: '请输入学历', trigger: 'blur' }],
   'info.field': [{ required: true, message: '请输入擅长领域', trigger: 'blur' }]
 })
+// 上传图片
+const onFUpload = (e) => {
+  const { model, value } = e
+  form.value.info[model] = value
+}
 // 注册
 const submitForm = async (formEl) => {
   if (!isAgree.value) {

+ 2 - 2
src/views/release/parts/parts/list.vue

@@ -20,11 +20,11 @@
                       v-else-if="i.type == 'dict'"
                     >
                       <span>{{ i.label }}</span>
-                      {{ getDict(item[i.model] || '暂无', [i.model]) }}
+                      {{ getDict(item[i.model], [i.model]) }}
                     </el-col>
                     <el-col :span="24" class="other_1" v-else-if="i.type == 'area'">
                       <span>{{ i.label }}</span>
-                      {{ getArea(item[i.model] || '暂无') }}
+                      {{ getArea(item[i.model]) }}
                     </el-col>
                     <el-col :span="24" class="other_1" v-else-if="i.type == 'time'">
                       <span>{{ i.label }}</span>

+ 1 - 0
src/views/search/index.vue

@@ -129,6 +129,7 @@ const getDict = (data, model) => {
 // 地区显示
 const getArea = (data) => {
   if (data) return data.join(',')
+  else return '暂无地区'
 }
 // 查看
 const toView = (item) => {

+ 2 - 2
src/views/search/parts/list.vue

@@ -15,11 +15,11 @@
                     </el-col>
                     <el-col :span="24" class="other_1" v-else-if="i.type == 'dict'">
                       <span>{{ i.label }}</span>
-                      {{ getDict(item[i.model] || '暂无', 'field') }}
+                      {{ getDict(item[i.model], 'field') }}
                     </el-col>
                     <el-col :span="24" class="other_1" v-else-if="i.type == 'area'">
                       <span>{{ i.label }}</span>
-                      {{ getArea(item[i.model] || '暂无') }}
+                      {{ getArea(item[i.model]) }}
                     </el-col>
                     <el-col :span="24" v-else class="other_1 textOver">
                       <span>{{ i.label }}</span>