| | |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="作业申请单位" prop="applyDepId"> |
| | | <el-cascader style="width: 100%" v-model="form.applyDepId" :options="lists.departList2" :props="props1" :show-all-levels="false" placeholder="明确到具体车间" @change="findParent" clearable/> |
| | | <el-cascader style="width: 100%" v-model="form.applyDepId" :options="lists.departList" :props="props1" :show-all-levels="false" placeholder="明确到具体车间" @change="findParent" clearable/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | } |
| | | |
| | | const findParent = ()=>{ |
| | | state.form.seDepId = findTopLevelId(props.lists.departList2,state.form.applyDepId) |
| | | state.form.seDepId = findTopLevelId(props.lists.departList,state.form.applyDepId) |
| | | } |
| | | |
| | | function findTopLevelId(tree, targetId) { |