|
@@ -25,14 +25,14 @@
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
<el-form-item label="项目阶段:" prop="key3">
|
|
<el-form-item label="项目阶段:" prop="key3">
|
|
<el-select v-model="baseForm.key3" placeholder="请选择">
|
|
<el-select v-model="baseForm.key3" placeholder="请选择">
|
|
- <el-option v-for="item in stateOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
|
|
|
+ <el-option v-for="item in stateOptions" :key="item.id" :label="item.dictValue" :value="item.id" />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
<el-form-item label="项目类型:" prop="key4">
|
|
<el-form-item label="项目类型:" prop="key4">
|
|
<el-select v-model="baseForm.key4" placeholder="请选择">
|
|
<el-select v-model="baseForm.key4" placeholder="请选择">
|
|
- <el-option v-for="item in typeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
|
|
|
+ <el-option v-for="item in typeOptions" :key="item.id" :label="item.dictValue" :value="item.id" />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -134,6 +134,8 @@
|
|
<script setup>
|
|
<script setup>
|
|
import { onMounted, ref, watch } from 'vue'
|
|
import { onMounted, ref, watch } from 'vue'
|
|
import { isNullES } from 'js-fast-way'
|
|
import { isNullES } from 'js-fast-way'
|
|
|
|
+import { getDictionary } from '~api/dictbiz'
|
|
|
|
+ import { arrToKey, formValidate, getArrValue, getObjValue, isArrItem } from 'js-fast-way'
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
form: {
|
|
form: {
|
|
@@ -154,6 +156,8 @@ watch(() => props.form, (data) => {
|
|
//渲染完成
|
|
//渲染完成
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
console.log(formInfo.value)
|
|
console.log(formInfo.value)
|
|
|
|
+ getProStation()
|
|
|
|
+ getProType()
|
|
})
|
|
})
|
|
|
|
|
|
const baseForm = ref({ key1:'', key2: '', key3:'', key4:'', key5:'', key6:'', key7:'', key8:'', key9:'' })
|
|
const baseForm = ref({ key1:'', key2: '', key3:'', key4:'', key5:'', key6:'', key7:'', key8:'', key9:'' })
|
|
@@ -182,11 +186,28 @@ const baseFormRules = {
|
|
const unitSelect = ref('')
|
|
const unitSelect = ref('')
|
|
|
|
|
|
//项目阶段
|
|
//项目阶段
|
|
-const stateOptions = ref([{ value: '1', label: '新开工项目' }, { value: '2', label: '建成项目' }, { value: '3', label: '在建项目' }])
|
|
|
|
|
|
+const stateOptions = ref([])
|
|
|
|
|
|
|
|
+const getProStation = async () => {
|
|
|
|
+ const { error, code, data } = await getDictionary({ code:'projectStage' })
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ stateOptions.value = getArrValue(data)
|
|
|
|
+ } else {
|
|
|
|
+ stateOptions.value = []
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|
|
//项目类型
|
|
//项目类型
|
|
-const typeOptions = ref([{ value: '1', label: '铁路' }, { value: '2', label: '高速公路' }, { value: '3', label: '在建项目' }])
|
|
|
|
-
|
|
|
|
|
|
+const typeOptions = ref([])
|
|
|
|
+const getProType = async () => {
|
|
|
|
+ const { error, code, data } = await getDictionary({ code:'projectType' })
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ typeOptions.value = getArrValue(data)
|
|
|
|
+ } else {
|
|
|
|
+ typeOptions.value = []
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
//选择年份
|
|
//选择年份
|
|
const yearOptions = ref([{ value: '2021', label: '2021' }, { value: '2022', label: '2022' }, { value: '2023', label: '2023' }])
|
|
const yearOptions = ref([{ value: '2021', label: '2021' }, { value: '2022', label: '2022' }, { value: '2023', label: '2023' }])
|
|
const selectYear = ref('')
|
|
const selectYear = ref('')
|