[feat] 更新项目跟踪表单和部门选项

This commit is contained in:
hhyykk 2024-12-21 21:36:17 +08:00
parent 74dac2a818
commit 2d49a7a49b
2 changed files with 8 additions and 31 deletions

View File

@ -110,14 +110,11 @@
</el-col>
<el-col :span="12">
<el-form-item label="地址" prop="address">
<el-cascader
<el-input
v-model="formData.address"
:options="areaList"
:props="defaultProps"
class="w-1/1"
clearable
filterable
placeholder="请选择城市"
placeholder="请输入地址"
/>
</el-form-item>
</el-col>
@ -163,8 +160,8 @@
</el-form-item>
</el-col>
<el-col :span="12" v-if="formData.emergency === true">
<el-form-item label="项目附件" prop="emergencyDocId" >
<UploadFile v-model="formData.emergencyDocId" />
<el-form-item label="项目附件" prop="emergencyDocUrl" >
<UploadFile v-model="formData.emergencyDocUrl" />
</el-form-item>
</el-col>
<el-col :span="24">
@ -323,7 +320,7 @@ const formData = ref({
situation: undefined,
emergency: undefined,
entrustmentMethod: undefined,
emergencyDocId: undefined,
emergencyDocUrl: undefined,
collaborativeProjects: undefined,
cooperativeCompanyId: undefined,
landingPossibility: undefined,
@ -426,7 +423,7 @@ const resetForm = () => {
situation: undefined,
emergency: undefined,
entrustmentMethod: undefined,
emergencyDocId: undefined,
emergencyDocUrl: undefined,
collaborativeProjects: undefined,
cooperativeCompanyId: undefined,
landingPossibility: undefined,

View File

@ -78,8 +78,6 @@ import { ProjectTrackingApi, ProjectTrackingVO } from '@/api/pm/projecttracking'
import ProjectTrackingForm from './ProjectTrackingForm.vue'
import SearchBarEx from "@/components/SearchBar/SearchBarEx.vue";
import { CustomerApi } from "@/api/pm/customer";
import * as DeptApi from '@/api/system/dept'
import { handleTree } from '@/utils/tree'
/** 项目跟踪 列表 */
defineOptions({ name: 'ProjectTracking' })
@ -90,7 +88,7 @@ const loading = ref(true) // 列表的加载中
const list = ref<ProjectTrackingVO[]>([]) //
const total = ref(0) //
const constructionOptions = ref([]); //
const deptOptions = ref<any[]>([]) //
const deptOptions = []; //
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
@ -178,11 +176,6 @@ const getConstructionOptions = async () => {
});
}
const getDeptOptions = async () => {
deptOptions.value = handleTree(await DeptApi.getSimpleDeptList())
}
//
const allFields = [
{ label: '项目名称', prop: 'name', component: 'el-input' },
@ -192,19 +185,7 @@ const allFields = [
component: 'el-select',
options: constructionOptions.value,
},
// { label: '', prop: 'deptName',component: 'el-input' },
{
label: '主控部门',
prop: 'deptId',
component: 'el-tree-select',
props: {
data: deptOptions.value,
props: { children: 'children', label: 'name', value: 'id' },
checkStrictly: true,
filterable: true,
clearable: true,
},
},
{ label: '主控部门', prop: 'deptName',component: 'el-input' },
{ label: '负责人', prop: 'pmName',component: 'el-input' },
{ label: '合同额', prop: 'contractAmount', component: 'el-input' },
{ label: '业务类型', prop: 'businessType', component: 'el-select', options: getStrDictOptions(DICT_TYPE.PROJECT_TYPE).map(dict => ({ label: dict.label, value: dict.value })) },
@ -215,6 +196,5 @@ const allFields = [
onMounted(() => {
getList()
getConstructionOptions(); //
getDeptOptions(); //
})
</script>