This commit is contained in:
wangchengming 2025-08-12 17:16:17 +08:00
parent 841b52f2e0
commit d1485520eb
5 changed files with 89 additions and 22 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -3,7 +3,7 @@ import { ElMessageBox, } from 'element-plus'
import { login, logout, getInfo } from '@/api/login' import { login, logout, getInfo } from '@/api/login'
import { getToken, setToken, removeToken } from '@/utils/auth' import { getToken, setToken, removeToken } from '@/utils/auth'
import { isHttp, isEmpty } from "@/utils/validate" import { isHttp, isEmpty } from "@/utils/validate"
import defAva from '@/assets/images/profile.jpg' import defAva from '@/assets/images/avatar_icon.png'
const useUserStore = defineStore( const useUserStore = defineStore(
'user', 'user',

View File

@ -90,13 +90,22 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="城市:"> <el-form-item label="城市:">
<el-select v-model="queryParams.provinceId" placeholder="请选择" @change="getCityList" clearable
style="min-width: 30px">
<el-option v-for="item in province" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="">
<el-select v-model="queryParams.cityId" placeholder="请选择" @change="getCountyList" clearable
style="min-width: 30px">
<el-option v-for="item in city" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="">
<el-select v-model="queryParams.countyId" placeholder="请选择" clearable
style="min-width: 30px">
<el-option v-for="item in county" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -214,6 +223,7 @@ import optionIcon from '@/assets/images/optionIcon.png'
import optionIconHover from '@/assets/images/optionIconHover.png' import optionIconHover from '@/assets/images/optionIconHover.png'
import { useBackgroundStore } from '@/store/modules/background' import { useBackgroundStore } from '@/store/modules/background'
import otherbg from '@/assets/images/otherbg.png' import otherbg from '@/assets/images/otherbg.png'
import { sysRegionListByPid } from "@/api/system/administrativeRegion"
import supplierForm from "./supplierForm.vue"; import supplierForm from "./supplierForm.vue";
import supplierDetail from "./supplierDetail.vue"; import supplierDetail from "./supplierDetail.vue";
@ -226,6 +236,10 @@ const showForm = ref(false)
const supplierFormRef = ref(null) const supplierFormRef = ref(null)
const showDetail = ref(false) const showDetail = ref(false)
const supplierDetailRef = ref(null) const supplierDetailRef = ref(null)
//
const province = ref([])
const city = ref([])
const county = ref([])
const defaultImageSrc = ref(optionIcon); const defaultImageSrc = ref(optionIcon);
const hoverImageSrc = ref(optionIconHover); const hoverImageSrc = ref(optionIconHover);
@ -270,6 +284,29 @@ const unfoldFlag = ref(false)
const handleFlod = () => { const handleFlod = () => {
unfoldFlag.value = !unfoldFlag.value unfoldFlag.value = !unfoldFlag.value
} }
// /
const getProvinceList = () => {
sysRegionListByPid({ parentId: '0' }).then(res => {
province.value = res.data
})
}
// /
const getCityList = (value) => {
sysRegionListByPid({ parentId: value }).then(res => {
queryParams.value.cityId = undefined
queryParams.value.countyId = undefined
city.value = res.data
})
}
// /
const getCountyList = (value) => {
sysRegionListByPid({ parentId: value }).then(res => {
queryParams.value.countyId = undefined
county.value = res.data
})
}
/** 查询岗位列表 */ /** 查询岗位列表 */
const getList = () => { const getList = () => {
@ -356,6 +393,7 @@ const handleShowList = () => {
// //
onMounted(() => { onMounted(() => {
bgStore.setBgImage(otherbg) bgStore.setBgImage(otherbg)
getProvinceList()
getList() getList()
}); });
</script> </script>

View File

@ -152,28 +152,28 @@
<el-row :gutter="20" class="my_form_row"> <el-row :gutter="20" class="my_form_row">
<el-col :span="8"> <el-col :span="8">
<el-form-item label=""> <el-form-item label="">
<el-select v-model="ruleForm.media_quality" placeholder="请选择" <el-select v-model="ruleForm.provinceId" placeholder="请选择" @change="getCityList"
style="min-width: 30px;" clearable> clearable style="min-width: 30px">
<el-option v-for="dict in media_quality" :key="dict.value" :label="dict.label" <el-option v-for="item in province" :key="item.id" :label="item.name"
:value="dict.value" /> :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label=""> <el-form-item label="">
<el-select v-model="ruleForm.media_quality" placeholder="请选择" <el-select v-model="ruleForm.cityId" placeholder="请选择" @change="getCountyList"
style="min-width: 30px;" clearable> clearable style="min-width: 30px">
<el-option v-for="dict in media_quality" :key="dict.value" :label="dict.label" <el-option v-for="item in city" :key="item.id" :label="item.name"
:value="dict.value" /> :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label=""> <el-form-item label="">
<el-select v-model="ruleForm.media_quality" placeholder="请选择" <el-select v-model="ruleForm.countyId" placeholder="请选择" clearable
style="min-width: 30px;" clearable> style="min-width: 30px">
<el-option v-for="dict in media_quality" :key="dict.value" :label="dict.label" <el-option v-for="item in county" :key="item.id" :label="item.name"
:value="dict.value" /> :value="item.id" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -424,7 +424,7 @@
<script setup> <script setup>
import { onMounted, defineEmits, ref } from 'vue' import { onMounted, defineEmits, ref } from 'vue'
import { Close } from '@element-plus/icons-vue' import { Close } from '@element-plus/icons-vue'
import { sysRegionListByPid } from "@/api/system/administrativeRegion"
import iconDoc from '@/assets/images/iconDoc.png' import iconDoc from '@/assets/images/iconDoc.png'
import iconOther from '@/assets/images/iconOther.png' import iconOther from '@/assets/images/iconOther.png'
import iconPdf from '@/assets/images/iconPdf.png' import iconPdf from '@/assets/images/iconPdf.png'
@ -442,7 +442,10 @@ const { proxy } = getCurrentInstance()
const emit = defineEmits(['handleShowList']); const emit = defineEmits(['handleShowList']);
const route = useRoute() const route = useRoute()
const formTitle = ref('新建') const formTitle = ref('新建')
//
const province = ref([])
const city = ref([])
const county = ref([])
const data = reactive({ const data = reactive({
ruleForm: {}, ruleForm: {},
rules: { rules: {
@ -453,6 +456,31 @@ const { ruleForm, rules } = toRefs(data)
const { invoice_type, media_ownership, personnel_size, main_media_types, media_quality, history_cooperation, supplier_level, supplier_cooperation_degree, main_business, business_department, company_type, cooperative_procurement_amount, cooperation_discount_intensity, enterprise_bad_records } = proxy.useDict("invoice_type", "media_ownership", "personnel_size", "main_media_types", "media_quality", "history_cooperation", "supplier_level", "supplier_cooperation_degree", "main_business", "business_department", "company_type", "cooperative_procurement_amount", "cooperation_discount_intensity", "enterprise_bad_records") const { invoice_type, media_ownership, personnel_size, main_media_types, media_quality, history_cooperation, supplier_level, supplier_cooperation_degree, main_business, business_department, company_type, cooperative_procurement_amount, cooperation_discount_intensity, enterprise_bad_records } = proxy.useDict("invoice_type", "media_ownership", "personnel_size", "main_media_types", "media_quality", "history_cooperation", "supplier_level", "supplier_cooperation_degree", "main_business", "business_department", "company_type", "cooperative_procurement_amount", "cooperation_discount_intensity", "enterprise_bad_records")
// /
const getProvinceList = () => {
sysRegionListByPid({ parentId: '0' }).then(res => {
province.value = res.data
})
}
// /
const getCityList = (value) => {
sysRegionListByPid({ parentId: value }).then(res => {
ruleForm.value.cityId = undefined
ruleForm.value.countyId = undefined
city.value = res.data
})
}
// /
const getCountyList = (value) => {
sysRegionListByPid({ parentId: value }).then(res => {
ruleForm.value.countyId = undefined
county.value = res.data
})
}
// //
const docUploadList = ref([]) const docUploadList = ref([])
const baseUrl = import.meta.env.VITE_APP_BASE_API const baseUrl = import.meta.env.VITE_APP_BASE_API
@ -517,6 +545,7 @@ const handleClose = () => {
// //
onMounted(() => { onMounted(() => {
bgStore.setBgImage(otherbg) bgStore.setBgImage(otherbg)
getProvinceList()
const id = route.params && route.params.Id const id = route.params && route.params.Id
if (id) { if (id) {
ruleForm.value.id = id ruleForm.value.id = id