瀏覽代碼

工作要点

ZaiZai 1 年之前
父節點
當前提交
1bb0cbbe12
共有 2 個文件被更改,包括 10 次插入15 次删除
  1. 10 13
      src/views/project/gist/create.vue
  2. 0 2
      src/views/project/gist/list.vue

+ 10 - 13
src/views/project/gist/create.vue

@@ -6,7 +6,7 @@
         <el-form ref="baseFormRef" :model="baseForm" :rules="baseFormRules" label-position="top" label-width="auto" size="large">
             <el-form-item label="选择项目阶段:" prop="key1">
                 <el-select v-model="baseForm.key1" placeholder="请选择">
-                    <el-option v-for="item in stateOptions" :key="item.id" :label="item.dictValue" :value="item.id" />
+                    <el-option v-for="item in projectStage" :key="item.value" :label="item.label" :value="item.value" />
                 </el-select>
             </el-form-item>
             <el-form-item label="目标任务:" prop="key2">
@@ -47,7 +47,8 @@
 <script setup>
 import { onMounted, ref, watch } from 'vue'
 import { deepClone, getArrValue, getRandom, isNullES } from 'js-fast-way'
-import { getDictionary } from '~api/dictbiz'
+import { getDictionaryData } from '~src/utils/tools'
+import mainApi from '~api/project/gist'
 
 const props = defineProps({
     form: {
@@ -68,9 +69,15 @@ watch(() => props.form, (data) => {
 //渲染完成
 onMounted(() => {
     console.log(formInfo.value)
-    getProStationTip()
+    getDataApi()
 })
 
+//获取接口数据
+const projectStage = ref([])
+const getDataApi = async () => {
+    projectStage.value = await getDictionaryData('projectStage', true)
+}
+
 const baseFormRef = ref(null)
 const baseForm = ref({
     key1:'', key2: '',
@@ -88,17 +95,7 @@ const baseFormRules = {
         message: '请输入目标任务',
     },
 }
-//项目阶段
-const stateOptions = ref([])
-const getProStationTip = async () => {
-const { error, code, data } = await getDictionary({ code:'workFocusStage' })
-    if (!error && code === 200) {
-        stateOptions.value = getArrValue(data)
-    } else {
-        stateOptions.value = []
-    }   
 
-}
 //处理ref
 const gistRefs = ref([])
 const setGistRefs = (el, index) => {

+ 0 - 2
src/views/project/gist/list.vue

@@ -56,8 +56,6 @@ const getDataApi = async () => {
     searchClick()
 }
 
-const tableRef = ref(null)
-
 //项目阶段
 const projectStage = ref([])