zs 8 mēneši atpakaļ
vecāks
revīzija
fb2d01dea8

+ 1 - 1
src/lang/package/zh-cn/pages.js

@@ -219,7 +219,7 @@ export default {
     video: '活动视频',
     href: '外部链接',
     work: '组织单位',
-    industry: '所属产业',
+    industry: '业',
     form: '类别',
     file: '封面',
     time: '有效期',

+ 13 - 7
src/views/information/parts/match/score/index.vue

@@ -9,7 +9,7 @@
             </el-steps>
           </el-col>
         </el-row>
-        <el-col :span="24" class="one">
+        <el-col :span="24" class="one" v-if="matchPathList.length > 0">
           <custom-button-bar :fields="buttonFields" @add="toAdd"></custom-button-bar>
         </el-col>
         <el-col :span="24" class="two">
@@ -18,6 +18,7 @@
               <el-table-column type="index" label="序号" width="80" align="center" />
               <el-table-column prop="matchPath_name" label="流程" align="center" />
               <el-table-column prop="sign_name" label="选手" align="center" />
+              <el-table-column prop="sign_phone" label="联系方式" align="center" />
               <el-table-column prop="score" label="分数" align="center">
                 <template #default="scope">
                   <el-input v-model="scope.row.score" type="number" placeholder="请输入分数" />
@@ -25,16 +26,18 @@
               </el-table-column>
               <el-table-column label="操作" align="center" width="100">
                 <template #default="scope">
-                  <el-link :underline="false" type="primary" size="mini" @click="onSave(scope.row)" style="margin-right: 10px">保存</el-link>
                   <el-link :underline="false" type="danger" size="mini" @click="onDelete(scope.row)"> 删除 </el-link>
                 </template>
               </el-table-column>
             </el-table>
+            <div class="button" v-if="matchPathList.length > 0">
+              <el-button @click="buttonSave" type="primary">保存</el-button>
+            </div>
             <el-col :span="24" class="thr">
               <el-pagination background layout="prev, pager, next" :total="total" :page-size="limit" v-model:current-page="currentPage" @current-change="changePage" @size-change="sizeChange" />
             </el-col>
           </div>
-          <div class="button">
+          <div class="button" v-if="matchPathList.length > 1">
             <el-button @click="back">上一步</el-button>
             <el-button @click="next">下一步</el-button>
           </div>
@@ -117,7 +120,8 @@ const searchOther = async () => {
 const search = async (query = { skip, limit }) => {
   skip = query.skip
   limit = query.limit
-  const info = { skip: query.skip, limit: query.limit, ...searchForm.value, match: id.value, matchPath: matchPathList.value[active.value].id }
+  const info = { skip: query.skip, limit: query.limit, ...searchForm.value, match: id.value }
+  if (matchPathList.value && matchPathList.value.length > 0) info.matchPath = matchPathList.value[active.value].id
   const res = await store.list(info)
   if (res.errcode == '0') {
     data.value = res.data
@@ -136,11 +140,13 @@ const onDelete = async (data) => {
     search({ skip, limit })
   }
 }
-const onSave = async (data) => {
+const buttonSave = async () => {
   let res
   const other = { time: moment().format('YYYY-MM-DD'), match: id.value }
-  if (get(data, 'id')) res = await store.update({ ...data, ...other })
-  else res = await store.create({ ...data, ...other })
+  for (const val of data.value) {
+    if (get(val, 'id')) res = await store.update({ ...val, ...other })
+    else res = await store.create({ ...val, ...other })
+  }
   if ($checkRes(res, true)) {
     search({ skip, limit })
   }

+ 1 - 1
src/views/information/parts/platform/demand.vue

@@ -119,7 +119,7 @@ const loading = ref(false)
 const formFields = ref([
   { label: t('pages.demand.name'), model: 'name' },
   { label: t('pages.demand.tags'), model: 'tags', custom: true },
-  { label: t('pages.demand.field'), model: 'field' },
+  { label: t('pages.demand.field'), model: 'field', type: 'select' },
   { label: t('pages.demand.urgent'), model: 'urgent', type: 'select' },
   { label: t('pages.demand.method'), model: 'method', type: 'select' },
   { label: t('pages.demand.money'), model: 'money' },

+ 140 - 141
src/views/information/parts/platform/match.vue

@@ -5,7 +5,7 @@
         <el-option v-for="i in typeList" :key="i.id" :label="i.label" :value="i.value"></el-option>
       </template>
       <template #industry>
-        <el-option v-for="i in sectorList" :key="i.id" :label="i.title" :value="i.title"></el-option>
+        <el-option v-for="i in industryList" :key="i.id" :label="i.label" :value="i.value"></el-option>
       </template>
     </custom-search-bar>
     <custom-button-bar :fields="buttonFields" @add="toAdd" @select="toMoreDelect"></custom-button-bar>
@@ -17,140 +17,140 @@
     </custom-table>
   </div>
   <el-dialog v-model="dialog.show" :title="dialog.title" :destroy-on-close="false" @close="toClose">
-      <el-row>
-        <el-col :span="24" v-if="dialog.type == '1'">
-          <custom-form v-model="form" :fields="formFields" :rules="rules" @save="toSave">
-            <template #video>
-              <custom-upload model="video" :list="form.video" :limit="1" url="/files/web/cxyy_match/upload" @change="onUpload"></custom-upload>
-            </template>
-            <template #file>
-              <custom-upload model="file" :list="form.file" :limit="1" listType="picture-card" url="/files/web/cxyy_match/upload" @change="onUpload"></custom-upload>
-            </template>
-            <template #is_use>
-              <el-radio v-for="i in isUseList" :key="i.id" :label="i.value">{{ i.label }}</el-radio>
-            </template>
-            <template #is_show>
-              <el-radio v-for="i in isUseList" :key="i.id" :label="i.value">{{ i.label }}</el-radio>
-            </template>
-            <template #industry>
-              <el-option v-for="i in sectorList" :key="i.id" :label="i.title" :value="i.title"></el-option>
-            </template>
-            <template #match_status>
-              <el-option v-for="i in matchList" :key="i.id" :label="i.label" :value="i.value"></el-option>
-            </template>
-            <template #scale>
-              <el-radio v-for="i in scaleList" :key="i.id" :label="i.value">{{ i.label }}</el-radio>
-            </template>
-            <template #match_type>
-              <el-radio v-for="i in matchTypeList" :key="i.id" :label="i.value">{{ i.label }}</el-radio>
-            </template>
-            <template #type>
-              <el-option v-for="i in typeList" :key="i.id" :label="i.label" :value="i.value"></el-option>
-            </template>
-            <template #form>
-              <el-option v-for="i in formList" :key="i.id" :label="i.label" :value="i.value"></el-option>
-            </template>
-            <template #tags>
-              <el-select v-model="form.tags" multiple filterable allow-create default-first-option :reserve-keyword="false" placeholder="请选择标签" style="width: 100%">
-                <el-option v-for="item in tagsList" :key="item.id" :label="item.title" :value="item.title" />
-              </el-select>
-            </template>
-            <template #rules>
-              <div class="rules">
-                <custom-form v-model="form.rules" :fields="rulesFields" :useSave="false">
-                  <template #rules1>
-                    <WangEditor v-model="form.rules.rules1" />
-                  </template>
-                  <template #rules2>
-                    <WangEditor v-model="form.rules.rules2" />
-                  </template>
-                  <template #rules3>
-                    <WangEditor v-model="form.rules.rules3" />
-                  </template>
-                  <template #rules4>
-                    <WangEditor v-model="form.rules.rules4" />
-                  </template>
-                  <template #rules5>
-                    <WangEditor v-model="form.rules.rules5" />
-                  </template>
-                  <template #rules6>
-                    <WangEditor v-model="form.rules.rules6" />
-                  </template>
-                  <template #rules7>
-                    <WangEditor v-model="form.rules.rules7" />
-                  </template>
-                  <template #rules8>
-                    <WangEditor v-model="form.rules.rules8" />
-                  </template>
-                  <template #rules9>
-                    <WangEditor v-model="form.rules.rules9" />
-                  </template>
-                  <template #rules10>
-                    <WangEditor v-model="form.rules.rules10" />
-                  </template>
-                  <template #rules11>
-                    <WangEditor v-model="form.rules.rules11" />
-                  </template>
-                  <template #rules12>
-                    <WangEditor v-model="form.rules.rules12" />
-                  </template>
-                </custom-form>
-              </div>
-            </template>
-            <template #brief>
-              <WangEditor v-model="form.brief" />
-            </template>
-            <template #process>
-              <el-col :span="24" class="tables">
-                <el-col :span="24" class="tables_1">
-                  <el-button type="primary" @click="addProcess()">添加</el-button>
-                </el-col>
-                <el-col :span="24">
-                  <el-table :data="processList" border>
-                    <el-table-column type="index" label="序号" width="80" align="center"> </el-table-column>
-                    <el-table-column prop="name" label="流程名称" align="center">
-                      <template #default="scope">
-                        <el-input v-model="scope.row.name" placeholder="请输入流程名称" />
-                      </template>
-                    </el-table-column>
-                    <el-table-column prop="order_num" label="排序" align="center">
-                      <template #default="scope">
-                        <el-input v-model="scope.row.order_num" type="number" placeholder="请输入排序" />
-                      </template>
-                    </el-table-column>
-                    <el-table-column prop="is_use" label="是否启用" align="center">
-                      <template #default="scope">
-                        <el-select v-model="scope.row.is_use" placeholder="请选择是否启用">
-                          <el-option v-for="item in isUseList" :key="item.value" :label="item.label" :value="item.value" />
-                        </el-select>
-                      </template>
-                    </el-table-column>
-                    <el-table-column label="操作" align="center" width="100">
-                      <template #default="scope">
-                        <el-button type="danger" @click="delProcess(scope.row)">删除</el-button>
-                      </template>
-                    </el-table-column>
-                  </el-table>
-                </el-col>
+    <el-row>
+      <el-col :span="24" v-if="dialog.type == '1'">
+        <custom-form v-model="form" :fields="formFields" :rules="rules" @save="toSave">
+          <template #video>
+            <custom-upload model="video" :list="form.video" :limit="1" url="/files/web/cxyy_match/upload" @change="onUpload"></custom-upload>
+          </template>
+          <template #file>
+            <custom-upload model="file" :list="form.file" :limit="1" listType="picture-card" url="/files/web/cxyy_match/upload" @change="onUpload"></custom-upload>
+          </template>
+          <template #is_use>
+            <el-radio v-for="i in isUseList" :key="i.id" :label="i.value">{{ i.label }}</el-radio>
+          </template>
+          <template #is_show>
+            <el-radio v-for="i in isUseList" :key="i.id" :label="i.value">{{ i.label }}</el-radio>
+          </template>
+          <template #industry>
+            <el-option v-for="i in industryList" :key="i.id" :label="i.label" :value="i.value"></el-option>
+          </template>
+          <template #match_status>
+            <el-option v-for="i in matchList" :key="i.id" :label="i.label" :value="i.value"></el-option>
+          </template>
+          <template #scale>
+            <el-radio v-for="i in scaleList" :key="i.id" :label="i.value">{{ i.label }}</el-radio>
+          </template>
+          <template #match_type>
+            <el-radio v-for="i in matchTypeList" :key="i.id" :label="i.value">{{ i.label }}</el-radio>
+          </template>
+          <template #type>
+            <el-option v-for="i in typeList" :key="i.id" :label="i.label" :value="i.value"></el-option>
+          </template>
+          <template #form>
+            <el-option v-for="i in formList" :key="i.id" :label="i.label" :value="i.value"></el-option>
+          </template>
+          <template #tags>
+            <el-select v-model="form.tags" multiple filterable allow-create default-first-option :reserve-keyword="false" placeholder="请选择标签" style="width: 100%">
+              <el-option v-for="item in tagsList" :key="item.id" :label="item.title" :value="item.title" />
+            </el-select>
+          </template>
+          <template #rules>
+            <div class="rules">
+              <custom-form v-model="form.rules" :fields="rulesFields" :useSave="false">
+                <template #rules1>
+                  <WangEditor v-model="form.rules.rules1" />
+                </template>
+                <template #rules2>
+                  <WangEditor v-model="form.rules.rules2" />
+                </template>
+                <template #rules3>
+                  <WangEditor v-model="form.rules.rules3" />
+                </template>
+                <template #rules4>
+                  <WangEditor v-model="form.rules.rules4" />
+                </template>
+                <template #rules5>
+                  <WangEditor v-model="form.rules.rules5" />
+                </template>
+                <template #rules6>
+                  <WangEditor v-model="form.rules.rules6" />
+                </template>
+                <template #rules7>
+                  <WangEditor v-model="form.rules.rules7" />
+                </template>
+                <template #rules8>
+                  <WangEditor v-model="form.rules.rules8" />
+                </template>
+                <template #rules9>
+                  <WangEditor v-model="form.rules.rules9" />
+                </template>
+                <template #rules10>
+                  <WangEditor v-model="form.rules.rules10" />
+                </template>
+                <template #rules11>
+                  <WangEditor v-model="form.rules.rules11" />
+                </template>
+                <template #rules12>
+                  <WangEditor v-model="form.rules.rules12" />
+                </template>
+              </custom-form>
+            </div>
+          </template>
+          <template #brief>
+            <WangEditor v-model="form.brief" />
+          </template>
+          <template #process>
+            <el-col :span="24" class="tables">
+              <el-col :span="24" class="tables_1">
+                <el-button type="primary" @click="addProcess()">添加</el-button>
               </el-col>
-            </template>
-          </custom-form>
-        </el-col>
-        <el-col :span="24" v-if="dialog.type == '2'">
-          <custom-form v-model="examForm" :fields="examFormFields" :rules="examRules" @save="toExamSave">
-            <template #status>
-              <el-option v-for="i in statusList" :key="i.id" :label="i.label" :value="i.value"></el-option>
-            </template>
-          </custom-form>
-        </el-col>
-        <el-col :span="24" v-if="dialog.type === '3'">
-          <sign :matchInfo="matchInfo"></sign>
-        </el-col>
-        <el-col :span="24" v-if="dialog.type === '4'">
-          <score :matchInfo="matchInfo"></score>
-        </el-col>
-      </el-row>
-    </el-dialog>
+              <el-col :span="24">
+                <el-table :data="processList" border>
+                  <el-table-column type="index" label="序号" width="80" align="center"> </el-table-column>
+                  <el-table-column prop="name" label="流程名称" align="center">
+                    <template #default="scope">
+                      <el-input v-model="scope.row.name" placeholder="请输入流程名称" />
+                    </template>
+                  </el-table-column>
+                  <el-table-column prop="order_num" label="排序" align="center">
+                    <template #default="scope">
+                      <el-input v-model="scope.row.order_num" type="number" placeholder="请输入排序" />
+                    </template>
+                  </el-table-column>
+                  <el-table-column prop="is_use" label="是否启用" align="center">
+                    <template #default="scope">
+                      <el-select v-model="scope.row.is_use" placeholder="请选择是否启用">
+                        <el-option v-for="item in isUseList" :key="item.value" :label="item.label" :value="item.value" />
+                      </el-select>
+                    </template>
+                  </el-table-column>
+                  <el-table-column label="操作" align="center" width="100">
+                    <template #default="scope">
+                      <el-button type="danger" @click="delProcess(scope.row)">删除</el-button>
+                    </template>
+                  </el-table-column>
+                </el-table>
+              </el-col>
+            </el-col>
+          </template>
+        </custom-form>
+      </el-col>
+      <el-col :span="24" v-if="dialog.type == '2'">
+        <custom-form v-model="examForm" :fields="examFormFields" :rules="examRules" @save="toExamSave">
+          <template #status>
+            <el-option v-for="i in statusList" :key="i.id" :label="i.label" :value="i.value"></el-option>
+          </template>
+        </custom-form>
+      </el-col>
+      <el-col :span="24" v-if="dialog.type === '3'">
+        <sign :matchInfo="matchInfo"></sign>
+      </el-col>
+      <el-col :span="24" v-if="dialog.type === '4'">
+        <score :matchInfo="matchInfo"></score>
+      </el-col>
+    </el-row>
+  </el-dialog>
 </template>
 
 <script setup>
@@ -167,18 +167,16 @@ import { MatchStore } from '@/store/api/platform/match'
 import { ProcessStore } from '@/store/api/platform/process'
 import { DictDataStore } from '@/store/api/system/dictData'
 import { TagsStore } from '@/store/api/system/tags'
-import { SectorStore } from '@/store/api/system/sector'
 const store = MatchStore()
 const dictDataStore = DictDataStore()
 const tagsStore = TagsStore()
-const sectorStore = SectorStore()
 const processStore = ProcessStore()
 const match_id = ref('')
 const data = ref([])
 const searchForm = ref({})
 const fields = [
   { label: t('pages.match.name'), model: 'name', isSearch: true },
-  { label: t('pages.match.industry'), model: 'industry', type: 'select', isSearch: true },
+  { label: t('pages.match.industry'), model: 'industry', type: 'select', isSearch: true, format: (i) => getDict(i, 'industry') },
   { label: t('pages.match.tags'), model: 'tags', isSearch: true, format: (i) => getDict(i, 'tags') },
   { label: t('pages.match.type'), model: 'type', isSearch: true, type: 'select', format: (i) => getDict(i, 'type') },
   // { label: t('pages.match.money'), model: 'money' },
@@ -203,7 +201,7 @@ const opera = [
   }
 ]
 const buttonFields = [
-  { label: t('common.create'), method: 'add' },
+  { label: t('common.create'), method: 'add' }
   // { label: t('common.select'), method: 'select', type: 'danger' }
 ]
 let skip = 0
@@ -217,7 +215,7 @@ const typeList = ref([])
 const matchList = ref([])
 const formList = ref([])
 const tagsList = ref([])
-const sectorList = ref([])
+const industryList = ref([])
 const matchTypeList = ref([])
 const scaleList = ref([])
 // 流程列表
@@ -309,8 +307,8 @@ const searchOther = async () => {
   result = await tagsStore.query({ is_use: '0' })
   if ($checkRes(result)) tagsList.value = result.data
   // 行业
-  result = await sectorStore.query({ is_use: '0' })
-  if ($checkRes(result)) sectorList.value = result.data
+  result = await dictDataStore.query({ code: 'matchIndustry', is_use: '0' })
+  if ($checkRes(result)) industryList.value = result.data
 }
 const search = async (query = { skip, limit }) => {
   skip = query.skip
@@ -335,6 +333,7 @@ const getDict = (data, model) => {
     else if (model == 'status') res = statusList.value.find((f) => f.value == data)
     else if (model == 'type') res = typeList.value.find((f) => f.value == data)
     else if (model == 'match') res = matchList.value.find((f) => f.value == data)
+    else if (model == 'industry') res = industryList.value.find((f) => f.value == data)
     else if (model == 'tags') return data.join(',')
     return get(res, 'label')
   }

+ 2 - 2
src/views/information/parts/platform/supply.vue

@@ -96,7 +96,7 @@ const opera = [
   { label: t('common.delete'), method: 'delete', confirm: true, type: 'danger', display: (i) => i.is_use === '1' }
 ]
 const buttonFields = [
-  { label: t('common.create'), method: 'add' },
+  { label: t('common.create'), method: 'add' }
   // { label: t('common.select'), method: 'select', type: 'danger' }
 ]
 let skip = 0
@@ -120,7 +120,7 @@ const formFields = ref([
   { label: t('pages.supply.name'), model: 'name' },
   { label: t('pages.supply.industry'), model: 'industry', type: 'select' },
   { label: t('pages.supply.tags'), model: 'tags', custom: true },
-  { label: t('pages.supply.field'), model: 'field' },
+  { label: t('pages.supply.field'), model: 'field', type: 'select' },
   { label: t('pages.supply.urgent'), model: 'urgent', type: 'select' },
   { label: t('pages.supply.method'), model: 'method', type: 'select' },
   { label: t('pages.supply.money'), model: 'money' },