Merge branch 'main' of http://e19510c831.iok.la/admin/zhyc-sheep-ui
This commit is contained in:
@@ -70,12 +70,7 @@
|
||||
<el-col :span="10">
|
||||
<el-form-item label="品种" prop="varietyId">
|
||||
<el-select v-model="form.varietyId" placeholder="请选择品种" clearable>
|
||||
<el-option
|
||||
v-for="item in varietyOptions"
|
||||
:key="item.id"
|
||||
:label="item.variety"
|
||||
:value="Number(item.id)"
|
||||
/>
|
||||
<el-option v-for="item in varietyOptions" :key="item.id" :label="item.variety" :value="Number(item.id)" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -111,17 +106,8 @@
|
||||
|
||||
<!-- 导入弹窗 -->
|
||||
<el-dialog title="导入羊只信息" v-model="importOpen" width="400px" append-to-body>
|
||||
<el-upload
|
||||
ref="uploadRef"
|
||||
:limit="1"
|
||||
accept=".xlsx,.xls"
|
||||
:action="importUrl"
|
||||
:headers="headers"
|
||||
:auto-upload="false"
|
||||
:on-success="handleImportSuccess"
|
||||
:on-error="handleImportError"
|
||||
drag
|
||||
>
|
||||
<el-upload ref="uploadRef" :limit="1" accept=".xlsx,.xls" :action="importUrl" :headers="headers"
|
||||
:auto-upload="false" :on-success="handleImportSuccess" :on-error="handleImportError" drag>
|
||||
<i class="el-icon-upload" />
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
</el-upload>
|
||||
@@ -133,12 +119,12 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { ref, onMounted, getCurrentInstance } from 'vue'
|
||||
import request from '@/utils/request'
|
||||
import { addSheep, exportSheepForm } from '@/api/produce/manage_sheep/add_sheep'
|
||||
import { listSheepfold_management as listSheepfold } from '@/api/fileManagement/sheepfold_management'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { getCurrentInstance } from 'vue'
|
||||
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
/* -------------------- 表单 -------------------- */
|
||||
@@ -169,7 +155,7 @@ const rules = {
|
||||
|
||||
/* -------------------- 下拉数据 -------------------- */
|
||||
const sheepfoldOptions = ref([])
|
||||
const varietyOptions = ref([])
|
||||
const varietyOptions = ref([])
|
||||
|
||||
function getSheepfoldOptions() {
|
||||
listSheepfold({ pageNum: 1, pageSize: 9999 }).then(res => {
|
||||
|
||||
Reference in New Issue
Block a user